Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64888 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44129 invoked from network); 12 Jan 2013 15:55:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 15:55:06 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:35638] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/03-24230-95781F05 for ; Sat, 12 Jan 2013 10:55:06 -0500 Received: from [172.17.0.122] (unknown [66.25.151.173]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id 0968A1203A3 for ; Sat, 12 Jan 2013 15:55:02 +0000 (UTC) Message-ID: <50F18754.4070304@zerocue.com> Date: Sat, 12 Jan 2013 09:55:00 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: internals@lists.php.net References: <9A.82.24230.BA281F05@pb1.pair.com> In-Reply-To: <9A.82.24230.BA281F05@pb1.pair.com> Content-Type: multipart/alternative; boundary="------------040506030406010807020908" Subject: Re: [PHP-DEV] [VOTE] array_column() function From: cpriest@zerocue.com (Clint Priest) --------------040506030406010807020908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit My .02 cents here... I'm used to array_pluck(), even when I first saw it I was like WTH is that? When you read the description though, 'plucking' is a verb which describes the action the function is taking, while column is a noun and does not describe the action the function is taking. In fact I have my own userland array_pluck() function. Ergo, array_column() doesn't make sense, array_get_column() might make sense, while array_pluck() makes sense. I'm fine with an alias or either one really, just pointing out the logic of "pluck." -Clint On 1/12/2013 9:34 AM, Ben Ramsey wrote: > On 1/12/13 9:19 AM, Derick Rethans wrote: >> I'm liking this, why start with an function alias already when >> introducing a new feature? > > I figured this would be a frequent question, and I was right. :-) > > In earlier discussions (June 2012), when I first introduced > array_column(), much of the discussion revolved around the name and > not the functionality. I agreed with arguments for array_column() and > arguments for array_pluck(), so I added an alias. > > Here's why I think the alias should be considered: > > 1) Userland PHP developers instantly recognize array_column(). It's > self-descriptive, and they know what it means. > > 2) Developers coming from other languages (Ruby, JavaScript, etc.) > will instantly recognize array_pluck(). It's what they'll be looking > for to do the same thing, but they won't be looking for array_column(). > > -Ben > -- -Clint --------------040506030406010807020908--