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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php