On Mon, May 16, 2016 at 2:17 AM, François Laupretre <franc...@php.net> wrote:
> Le 16/05/2016 à 03:33, Larry Garfield a écrit :
>> This still sounds awfully complicated to me.  I would far, far prefer
>> the $$ syntax to special casing function aliases just to dance around
>> it.  If we had a short-function syntax then requiring a piped function
>> to have only a single argument would be both reasonable and
>> typing-efficient.  Baring that, the $$ syntax seems far nicer than
>> alternate versions of functions with implicit arguments but only in
>> certain situations.
>
> The question, here, is to determine how serious is the issue of argument
> ordering in the PHP library. It seems you don't feel it as very serious, as
> you prefer a $$ placeholder.
>
I think you're making a false equivalence here.  One can see argument
ordering consistency as a serious problem without seeing a Heath
Robinson version of call chaining as the solution to it.

I appreciate that you want to seize onto any opportunity to fix the
argument ordering consistency problem, but I don't agree that this is
the fix for it.

> The question of function aliases is not so serious because we'll need very
> few. Almost every functions have only one 'natural' argument to substitute
> as lhs. I'm not sure I understand what you mean with 'but only in certain
> situations'.
>
If it were so natural, wouldn't the original version of these
functions have been made "right" in the first place?  I fear that the
only thing we'd gain by adding all these aliases is more functions,
but without the benefit of any improvement in the argument ordering
problem because now, instead of remembering which order the argument
is in, users have to remember which alias to call.

-Sara

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to