It's possible to use the tilde ~ easyly on keyboards?
For on BR/ABNT2 is easy. So maybe use ~> as operator could be fine,
instead of the triangle |>, and linear sounds good too, like:
$string~>escape($$)~>dump($$);

It's used currently on PHP for a bitwise operation (not), so I think
that the usage are not a problem in general.
Too will not have a conflict, because ~> no make any sense to PHP today.

2016-07-22 2:52 GMT-03:00 Sara Golemon <poll...@php.net>:
> On Thu, Jul 21, 2016 at 2:56 PM, Rowan Collins <rowan.coll...@gmail.com> 
> wrote:
>> On 21/07/2016 22:28, Sara Golemon wrote:
>>>
>>> Are you picturing the return statement returning from the current
>>> function? Or "returning" from the current pipe chain?
>>>
>>> I think you mean the former, in which case I'd ask how that'd better/worse
>>> than:
>>>
>>> return foo() |> bar($$);
>>
>> I do indeed mean returning from the current function. I went into more
>> detail (perhaps too much!) on the previous thread, but the basic premise is
>> the pipe operator gives you code that reads left to right. Adding an element
>> where you have to jump back to the beginning of the expression feels like it
>> defeats that.
>>
> Ah! I understand your point now.  Indeed, in terms of code-scan,
> there's something of a whiplash effect going on. Now I understand the
> motivation behind $> assignment and/or using a terminal like `return
> $$` at the end.
>
> Adding in support for some terminals (like return) could make sense,
> it's an exception to a rule, but it's a reasonable looking one (at
> first glance, anyway).
>
> The assign to var at the end however, is something I'd rather handle
> with the following:
>
> foo() |> bar($$) |> $baz = qux($$);
>
> Which is both legal with the syntax as-is, and entirely readable
> without adding an extra operator.
>
> -Sara
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
David Rodrigues

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

Reply via email to