opConcatAll?

jmh530 john.michael.hall at gmail.com
Fri Jul 3 17:54:29 UTC 2020


On Friday, 3 July 2020 at 17:13:32 UTC, Steven Schveighoffer 
wrote:
> [snip]
>
> Meh, the user can do anything he wants already. One can get 
> around precedence by deferring calls.
>
> It is true, though, that I didn't think of precedence when I 
> first posted -- I just wanted to avoid some allocations.
>
> -Steve

I see no reason why Aliak's suggestion above with respect to 
parentheses cannot be also used to ensure precedence is followed. 
For instance, if you have a + b * c, then it gets re-written to a 
+ (b * c), which gets re-written to something like 
a.op1(b.op2(c)).


More information about the Digitalmars-d mailing list