Move Constructor Syntax

Nick Treleaven nick at geany.org
Wed Oct 9 10:52:57 UTC 2024


On Monday, 7 October 2024 at 00:16:33 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> On 07/10/2024 12:09 PM, Richard (Rikki) Andrew Cattermole wrote:
>> ```d
>> this(ref Thing other) @move {
>> }
>> ```
>
> There is a very good reason to prefer an attribute rather than 
> new syntax, it doesn't break tooling.

Underrated comment. We shouldn't be breaking parsers when we 
don't need to.

In fact any solution not using the written word 'move' or 'copy' 
does not have intuitive syntax. I don't understand why anyone is 
trying to argue that using a sigil in a novel way is intuitive.


More information about the Digitalmars-d mailing list