Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64908 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8818 invoked from network); 12 Jan 2013 20:22:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 20:22:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=mjpelmear@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mjpelmear@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.42 as permitted sender) X-PHP-List-Original-Sender: mjpelmear@gmail.com X-Host-Fingerprint: 209.85.210.42 mail-da0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:45789] helo=mail-da0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/11-24230-E06C1F05 for ; Sat, 12 Jan 2013 15:22:39 -0500 Received: by mail-da0-f42.google.com with SMTP id z17so1256064dal.15 for ; Sat, 12 Jan 2013 12:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3mnmkU0iM/y+wMFoqevalzJdNc3WQOmXwcQujhoiZ5U=; b=WFVM9A0VKvX6HNmPqIPulgLqZgcbRQ6/HReqXaKiOiu0LGPLI3N8FdDeKI2+W+80H8 Jx1+ZcN5A2FcbvvQzAfPvd+FP4xYstahtzRSBKu/iNsK2dLn/WNq0MbUioi9xJuJbloO MB+mxtRj7OV2VcDx5FfA73tUWQi2B4gNKF47ObFzWSvuASqJOirX0tHi+GeQxdBGx3dH J3qv9ci736151bimldeMYk/PGhZxqMAin8CCBvphYVmbuNh3IwG4eFZv0KGlBsFnXjHn j0Dyn4anGZgX16NFq9Ngp68nMpusGq/tbOBcdckhAKPwDTWGt8mgeJuCHjdRnapA6OH4 GqVw== X-Received: by 10.66.84.3 with SMTP id u3mr217422225pay.51.1358022156256; Sat, 12 Jan 2013 12:22:36 -0800 (PST) Received: from [192.168.1.123] (cpe-98-154-250-197.socal.res.rr.com. [98.154.250.197]) by mx.google.com with ESMTPS id pu5sm5090453pbb.73.2013.01.12.12.22.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 12:22:35 -0800 (PST) Message-ID: <50F1C608.1060603@gmail.com> Date: Sat, 12 Jan 2013 12:22:32 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 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: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] array_column() function From: mjpelmear@gmail.com (Matt Pelmear) Hi, On 01/12/2013 07:34 AM, Ben Ramsey wrote: > > 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 > When I have to write JavaScript (for example), I end up doing google searches like "javascript php array_keys" and always find what I'm looking for without a problem. I really think the alias just adds confusion. Clint's argument for "pluck" being a verb and "column" being a noun makes some sense to me, however "plucking" would imply, to me, that the data is being removed from the source, as opposed to copied from it. As google says: "Pluck: Take hold of (something) and quickly remove it from its place". Also, "array_column" is certainly consistent with other function names in PHP (array_keys(), values(), key(), etc.), which also refer to a set of data within the array data structure, whereas "pluck" sounds very much like a carryover from Ruby and Prototype. -Matt