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

Reply via email to