Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60680 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7558 invoked from network); 27 May 2012 18:28:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2012 18:28:18 -0000 Authentication-Results: pb1.pair.com header.from=mathiasgrimm@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mathiasgrimm@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: mathiasgrimm@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gg0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:62711] helo=mail-gg0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/EC-09778-04272CF4 for ; Sun, 27 May 2012 14:28:16 -0400 Received: by ggnf2 with SMTP id f2so1724690ggn.29 for ; Sun, 27 May 2012 11:28:13 -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=2SW0LNtL/HeCKzPOYCgWJSBV2TnsmnkaPRHBPFUEeJ4=; b=WRvotrr/BvPh84PIb/u0alr94uiKNf98g9ll6Fkix02jQoSiM/YJUE1PpFgwGIdR35 qVQwvzWiy80X1L1PPhdiLsqXK9ftjzkt+Am+Co1BeTNMHjpfQDPAGgH2sNB5ZFm4E7Vb pmBn3HbrN43NC87yVr/OCe/7PtD4svDD/7+JBbxeC2VK9gV44JnOw2SDBtliYelQhdTA aImcJLdxvrJ64RP40U/zfeWvOcTs3yjaz29p4hM62gCLhibiZB11+ESDIIrlG0GvuBDT nLDszXpahdNaPv3t3ikSksflPOX5YUD6Dq4PUs8qIKdtp/OEyhZ4cR3B3dLX0IXsuRvR y9DA== MIME-Version: 1.0 Received: by 10.236.200.230 with SMTP id z66mr5489023yhn.82.1338143293170; Sun, 27 May 2012 11:28:13 -0700 (PDT) Received: by 10.236.63.204 with HTTP; Sun, 27 May 2012 11:28:13 -0700 (PDT) In-Reply-To: References: Date: Sun, 27 May 2012 19:28:13 +0100 Message-ID: To: Daniel Macedo Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf3040e442a5e48204c108c3af Subject: Re: [PHP-DEV] RFC Skipping optional parameters for functions From: mathiasgrimm@gmail.com (Mathias Grimm) --20cf3040e442a5e48204c108c3af Content-Type: text/plain; charset=ISO-8859-1 Named parameter in the same way that goto does, with labels. A labeled parameter... But there always some drawbacks... such as mix named and conventional parameters. I think that you just chose one way and use, not allowing mix these two ways. I also think that should exists a strict way to write code, something like error_reporting, but to ensure a specific way to write code, gaining speed in the whole compilation thing. strict_code_standard = K&R strict_code_standard = GNU strict_code_standard = PEAR strict_code_standard = ZEND The GO land does it in some way On Sun, May 27, 2012 at 7:03 PM, Daniel Macedo wrote: > > NOTE: Although related/solving some of the same problems; skipping optional parameters (several commas or using 'default' keyword) is different from using named parameters. > And both have different supporters/haters over each change. > > I wouldn't like to restart the whole debate over the KISS, "Not the PHP way", or the alternate ways work around the original issue. > > But on a personal opinion, I'd like to see named parameters implemented - which also solves the skipping optionals regardless of the order - the only concern of the community at large might be the proper syntax.. > > I also suggested the even shorter array syntax for 5.4: http://php.net/migration54.new-features > Which would use the colon as a separator > $a = ['one': 1, 'two': 2, 'three': 3, 'four': 4]; > > And the idea it would be simpler/efficient/readable inspired some dissent over both the readability and the PHP-way. > > So I'm not sure if your suggestion won't keep the same issue... -- Mathias Grimm --20cf3040e442a5e48204c108c3af--