Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68847 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57303 invoked from network); 2 Sep 2013 12:32:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2013 12:32:21 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:65353] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/A5-29856-35584225 for ; Mon, 02 Sep 2013 08:32:20 -0400 Received: by mail-la0-f50.google.com with SMTP id es20so3629676lab.9 for ; Mon, 02 Sep 2013 05:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rbAILZS7kA3UmvftId4eHjM8BGDWNhmmf1BjxWJwBtw=; b=IYO8VI9GZN4QzXm/S1NKDwn/HqdJwiZZOLOJM5J/oAYM9SYwSp25UaiTIa9bEZtTgM KCGk0jAI6Rl9dsWvkTCUtHa/taR2AFaVsZI+hNX5KDbow7tCaQHYdghP9Sr/LI5vaJpC f4ZAeINRWu/+5O96tzyCOWgBCPbDVPnFWwjyh/OfFtm6cWelEM/1LnhKKvQ7mo2KzZOj 28qBVb/EllFN9/b42zdLT3YnRA1yl4Xvakc9teTmDKtVuZ6e/Qh+QohfoTdrahysutz3 EaQgikNvgY0kkc5raAUtLgAKkud0gpsvBdCmnAnrqyGI33NU7TGfu3gSPxra1a+uoqUA XqIg== MIME-Version: 1.0 X-Received: by 10.112.52.225 with SMTP id w1mr1692783lbo.31.1378125136366; Mon, 02 Sep 2013 05:32:16 -0700 (PDT) Received: by 10.112.148.138 with HTTP; Mon, 2 Sep 2013 05:32:16 -0700 (PDT) In-Reply-To: <52243BA6.5040905@sugarcrm.com> References: <52243BA6.5040905@sugarcrm.com> Date: Mon, 2 Sep 2013 14:32:16 +0200 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Skipping parameters take 2 From: pierre.php@gmail.com (Pierre Joye) hi Stas, On Mon, Sep 2, 2013 at 9:17 AM, Stas Malyshev wrote: > Hi! > > I've finally took some time to revive the skipping parameter RFC and > patch. For those who doesn't remember what it is please see: > https://wiki.php.net/rfc/skipparams > TLDR version: > > The idea is to allow skipping parameters in function with optional > arguments so that this: > function create_query($where, $order_by, $join_type='INNER', $execute > = false, $report_errors = true) > > can be called like this: > create_query("deleted=0", "name", default, default, > /*report_errors*/ true); > > Instead of trying to remember what the defaults are. > The patch is here: > > https://github.com/php/php-src/pull/426 > > Any comments or feedback on the RFCs and the code are welcome, > especially pointing out the cases where it may not work (which means we > need more phpt's there :) Using default instead of ,,, is indeed much more readable. However I still wonder what prevents to finally implement named parameters too, it will provide the same feature while being even more handy and easier. I could dig the archives but I don't remember what was the reason why we rejected the idea back then. Cheers, -- Pierre @pierrejoye | http://www.libgd.org