| |
 | Posted by IchorDev in reply to Basile B. | Permalink Reply |
|
IchorDev 
Posted in reply to Basile B.
| On Monday, 30 December 2024 at 21:33:58 UTC, Basile B. wrote:
> If you look long enough at some code you'll see patterns like
a = a.b;
this pattern strangely looks like binary assignment operators
a = a + b;
which can be rewritten as
a += b;
In the same fashion we could have
a .= b;
The point is to evaluate te left hand side only once.
It’s a nice idea but it doesn’t help with the similar and perhaps more commonly used pattern slice = slice[1..$] . Is there any way we could redesign the syntax so it works for any case of Identifier = Identifier Expression ?
|