binary dot assignment
monkyyy
crazymonkyyy at gmail.com
Tue Jan 21 22:44:40 UTC 2025
On Tuesday, 21 January 2025 at 20:55:34 UTC, IchorDev wrote:
> On Monday, 30 December 2024 at 21:33:58 UTC, Basile B. wrote:
>>
>> ```d
>> a .= b;
>> ```
>
> 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`?
```d
auto pop(R)(R r)=>r[1..$];
slice.=pop;
```
?
More information about the dip.ideas
mailing list