> On 12 במאי 2016, at 15:34, Quim Calpe <q...@kalpe.com> wrote:
> 
>> On Thu, May 12, 2016 at 12:33 PM, Davey Shafik <da...@php.net> wrote:
>> 
>> On Thu, May 12, 2016 at 1:19 AM, Larry Garfield <la...@garfieldtech.com>
>> wrote:
>> 
>>>> On Mon, May 9, 2016, at 10:21 PM, Stanislav Malyshev wrote:
>>>> Hi!
>>>> 
>>>>> |> seems like a common symbol to use, but it admittedly does look a
>>>> 
>>>> So, usage in one semi-obscure language (F#) and one completely obscure
>>>> one (Elixir) - Clojure doesn't use |> - and one proposal for Javascript
>>>> now qualifies for "common". And that counting the fact that neither of
>>>> them actually uses the worst part of proposed syntax - magic variable
>> $$.
> 
> Is $0 being considered? It's not ideal but is used as "pattern match
> reference" in preg_replace, so we have a (sort of) precedent here. Same for
> $1 (first capturing subpattern).
> 

Folks,

Whether it's $$ or !# or $0 or any other random symbol doesn't really matter.  
What matters is the introduction of a new symbol for this purpose and the non 
intuitive nature it will have.

This is not analogous to the namespace operator, where it was obvious we wanted 
namespaces, and was only a matter of picking the right one.  It's also not 
analogous in the sense that codebases that use namespaces tend to use them all 
over, so the likelihood of not being acquainted with it is slim.

Here we have a completely optional syntactic sugar, that's not nearly as widely 
useful as OOP or namespaces, and the question is whether the added complexity 
of a new operator, a new symbol and the new semantics around them both are 
worth the benefit of introducing them.  IMHO it's not.

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

Reply via email to