On Sat, Jan 12, 2013 at 7:34 AM, Ben Ramsey <ram...@php.net> 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().
>

As an alternative to an alias, what about a manual page for whichever name
isn't used that redirects or (like delete <http://php.net/delete>) refers
to the one that is used? Of course, this wouldn't help when someone is
searching or browsing through code. For #2, were you envisioning the
developer looking for a "pluck" function in the manual, browsing source and
coming across the function, searching (grep &c) the code for a "pluck"
function, or something else?

Reply via email to