Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91216 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43801 invoked from network); 12 Feb 2016 11:49:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2016 11:49:38 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.161.177 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.161.177 mail-yw0-f177.google.com Received: from [209.85.161.177] ([209.85.161.177:34239] helo=mail-yw0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/01-25203-EC6CDB65 for ; Fri, 12 Feb 2016 06:49:35 -0500 Received: by mail-yw0-f177.google.com with SMTP id h129so62614112ywb.1 for ; Fri, 12 Feb 2016 03:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=34y5pGX2FiKyuU5aRFCSQtaal/OX5ZZNX8r89+znANo=; b=RhIibxEo8DER3TB/eEQZHl96jChOYYuGR3Wpc/95W3zOHSfYiaBKYmRGOaKX9TcQaG 7nAFsygQ+IvkfoucQEE1TQS22qcg8kiGa87gXfS3axQ516WqJmkbYS17Kt36eC23GHvG RXhXxULClFdABOGp+V8q6coPRuTUHC4oq8J2nj5eIha0+LeVPP3zYZhKj6CKTsg/81vB C46DaOn52+7PiO1d7P7qkSO4Lrb39+Wp9X1MZiWGSqu5xzA+nt0GOV9V3BvncijtkmS2 JtBPjXS89+NYxZXoeh0POW9cA4m/fyastb6qk7U8PPgk7EKBTikROzIAWn4+U/YVKnCS 05lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=34y5pGX2FiKyuU5aRFCSQtaal/OX5ZZNX8r89+znANo=; b=OTW4p/1QqyPVYDNTYVILV+1FZm4SlZpqjxJj7eSA2MwUsQ7vGFH1ASCCtT0n4+RceL M19IhWiUUsxTFXenoDdDm4eNG5cheq4ydM7D+1mCCHomna1llSFdv0h1jB3QAdsL3Xxh nDZtPb7TpTfaLfYQVNBRxj6G5s5lnYTSahVRQV8KAhKEyl//CdCqH4TyesXL7J8m2VrT 8YQe+2/tk4uStyvABGsHWiFL/hdAF2wZgkIR+rqQW4U8sTDdGziwrJxxOe+dF4UCfGFa URxBX585NsJqT6Foy0vkIMKjGuF7w3EcaB3ORO52PgCMVZX4/ktJonCa3cfb6fMzT0wt TWow== X-Gm-Message-State: AG10YOSSYOwtHYD64T1AnxNa6UvxvZXjyo9A9d494kYkC468v0TX7fTF/GJ3Zz1bea2Iyic6DDzAeA9sug2IMA== MIME-Version: 1.0 X-Received: by 10.129.86.131 with SMTP id k125mr537960ywb.158.1455277771709; Fri, 12 Feb 2016 03:49:31 -0800 (PST) Received: by 10.129.87.208 with HTTP; Fri, 12 Feb 2016 03:49:31 -0800 (PST) X-Originating-IP: [165.120.174.12] In-Reply-To: References: <38.31.07203.2EB94B65@pb1.pair.com> <8E.1A.36326.338F8B65@pb1.pair.com> Date: Fri, 12 Feb 2016 11:49:31 +0000 Message-ID: To: "guilhermeblanco@gmail.com" Cc: Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=001a1143312ca27fc8052b9142f7 Subject: Re: [PHP-DEV] Re: [RFC][VOTE] Allow specifying keys in list() From: pthreads@pthreads.org (Joe Watkins) --001a1143312ca27fc8052b9142f7 Content-Type: text/plain; charset=UTF-8 Morning, 1 - I'm not completely certain what you are referring too ... list() has always felt a bit strange to me and this doesn't feel any stranger imo. 2 - Perhaps I agree, but perhaps I tend to think that it's because I'm not used to looking at it yet. 3 - This isn't relevant at the moment. 4 - This is only example illustrative code. It isn't always about how many characters you have to type ... public function __construct(array $things) { $options = $things + $this->defaults; $this->apples = $options["apples"]; $this->oranges = $options["oranges"]; } This is a pretty common pattern ... I much prefer this: public function __construct(array $things) { list ( "apples" => $this->apples, "oranges" => $this->oranges ) = ($things + $this->defaults); } Not because it's less characters (although it is, by one), but because it's more expressive. Anyway +1 from me ... even if it's a bit late ... Cheers Joe On Tue, Feb 9, 2016 at 3:36 PM, guilhermeblanco@gmail.com < guilhermeblanco@gmail.com> wrote: > Here is my reasons for no: > > 1- Non-intuitive behavior > 2- Hard to read code, takes more time to understand underlying logic/flow > 3- YAANPI => Yet Another Alternate Named Parameters Implementation (when I > look at future scope) > 4- Most common usage form (first example) still forces you to type almost > same amount of logic with less readability and little value > > Regards, > > On Tue, Feb 9, 2016 at 1:50 AM, Joe Watkins wrote: > >> Morning internalz, >> >> As mentioned the future scope stuff is scary, but not enough on it's >> own to vote no. >> >> So I want to vote yes, but I'm just waiting to hear objections from no >> voters, in case they thought of something I didn't ... >> >> Cheers >> Joe >> >> On Mon, Feb 8, 2016 at 8:18 PM, Andrea Faulds wrote: >> >> > Hi again, >> > >> > There's been a lot of No votes on this RFC, but I haven't received much >> > feedback as to why. Would any of you mind sharing your reasons, if >> > possible? It would be helpful if I knew why people have voted against >> it, >> > as then I might be able to modify the RFC to be more palatable, or >> > understand where I went wrong. >> > >> > Thanks! >> > >> > >> > Andrea Faulds wrote: >> > >> >> Hi everyone, >> >> >> >> It's been more than two weeks since I first proposed this RFC, and >> >> there's no outstanding issues preventing moving towards a vote. There's >> >> not yet a language specification patch, but that can be done later. >> >> >> >> So, I'm opening the vote on this RFC today, 2016-02-05, and it'll close >> >> the Sunday after next, 2016-02-14. The vote requires a 2/3 majority as >> >> it's a language change. >> >> >> >> The RFC page is here: https://wiki.php.net/rfc/list_keys >> >> >> >> Happy voting! >> >> >> > >> > >> > -- >> > Andrea Faulds >> > https://ajf.me/ >> > >> > -- >> > PHP Internals - PHP Runtime Development Mailing List >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> > >> > > > > -- > Guilherme Blanco > MSN: guilhermeblanco@hotmail.com > GTalk: guilhermeblanco > Toronto - ON/Canada > --001a1143312ca27fc8052b9142f7--