On Thu, Jan 19, 2017 at 4:08 PM, Rowan Collins <rowan.coll...@gmail.com>
wrote:
>
>
> On 19/01/2017 22:17, Ryan Pallas wrote:
>
>>
>> When you say assert the right hand side is callable, does that mean to
>> call an object method, you would do [$obj, 'method']? What about
>> functions,
>> is it just the name like $str |> trim, or is it $str |> trim()?
>>
>
> This is a good point. The difference between the pipe operator as proposed
> by Sara and the combination of two separate operators is that in Sara's
> proposal you'd always write this:
>
> $str |> trim($$)
>
> But in Levi's proposal as I understand it, the right-hand side is not
> syntax, it's just constrained to be callable, so the simpler (but rather
> ugly) form would be:
>
> $str |> 'trim'
>

See I don't like that at all, I hate having to put functions/methods in
strings, as find usages and refactor tools generally don't find the
strings. But sometimes I have to yield my preference to those who outrank
me (aka those with voting power)

Reply via email to