Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80844 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25733 invoked from network); 19 Jan 2015 18:49:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2015 18:49:13 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.171 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.171 mail-ie0-f171.google.com Received: from [209.85.223.171] ([209.85.223.171:49605] helo=mail-ie0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/8F-64889-8A15DB45 for ; Mon, 19 Jan 2015 13:49:13 -0500 Received: by mail-ie0-f171.google.com with SMTP id tr6so3656415ieb.2 for ; Mon, 19 Jan 2015 10:49:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=zT4tM2+cS/zBkTl1fDRIqB/YbAbAGs45G25UjDlI4oI=; b=qHl9QO6GiPhKWFlhCV8zNFH8N16LDL7PZ5+s/OjlWSlBLjGoAgHDt0F//RDUp36BFs VVPs74vgJoKx/IVJb+t8ncC2ENs9wWhK6hwtw+KzuZ7m/DhoyU4TdizS4IsVDfGje/42 2AbblYG9HtNosJsjk2P6AhtaerEtmzJzjY0no= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=zT4tM2+cS/zBkTl1fDRIqB/YbAbAGs45G25UjDlI4oI=; b=fj0w9+swSTjnkKk9wMLyMYi5EOQfgi/33lP6MVcX9oJsJMfcwKHpbChqgdH7hTHW42 o2uKjW1FudJpPJPcvFSsjeRH/VXmona5oAxSHX/GFrO0zK2YpF9J/OPrV4xhPxK5DiV8 Y+cSMzjIW1fT1ruX4oep5Fnkhqnv/N1JX3zVO1omQC+PkwvaJEBGPlZ3iBWyR1ajRLlB 0GXOOqtAYJAXEMEXA8rTFugt61uvKnQLA5x/Ls2w531CHVVtcjxCjUmqmOKSDUc5cMWj YOSQ55wckL/K1vSViu4WxEqQceqvNly0ZghhYTaf0KKFogE6J/YUrQgvH/ZOYARbqZ5b TgFQ== X-Gm-Message-State: ALoCoQn3dOa4c+6fuFX6Hp0iIShdEqXJFEouEt/VZyEcpTzBmg9jmJIuzk7L26+ZJz39G1rGtVi0 X-Received: by 10.43.19.134 with SMTP id qk6mr21531620icb.29.1421693349388; Mon, 19 Jan 2015 10:49:09 -0800 (PST) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.43.112.9 with HTTP; Mon, 19 Jan 2015 10:48:49 -0800 (PST) In-Reply-To: <9F083B4E-B603-4A1D-9F1D-C758D835B450@ajf.me> References: <52243BA6.5040905@sugarcrm.com> <54B6C047.3070301@mabe.berlin> <48223964-2F90-4386-BD8F-934791E45EB4@welsh.co.nz> <9F083B4E-B603-4A1D-9F1D-C758D835B450@ajf.me> Date: Mon, 19 Jan 2015 10:48:49 -0800 X-Google-Sender-Auth: H9iX2vN-Mfvd_Ni2IQDupT7TgzY Message-ID: To: Andrea Faulds Cc: internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Skipping parameters take 2 From: aharvey@php.net (Adam Harvey) On 17 January 2015 at 18:04, Andrea Faulds wrote: > For consistency with list(), we could also just put nothing: > > > foo($bar, , $baz); > > Which is like: > > list($bar, , $baz) =3D $arr; > > Thoughts? That was Stas's original, original proposal way back when. I argued then for having "default" as a placeholder, and still would today =E2=80=94= in the case where a function with, say, ten optional parameters[0] is being called and eight of them should be the default, I think it's a bit rough for somebody inheriting that code to have to count commas. Having a token increases readability, IMO, and costs us nothing except a few keystrokes, which isn't going to break the camel's back in a language that requires "function" each time you declare a function. Adam [0] Yes, that's probably poor API design. You and I both know someone will do it, though. :)