Move Constructor Syntax

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Oct 10 18:57:22 UTC 2024


On 10/10/2024 7:39 PM, Walter Bright wrote:
> On 10/6/2024 5:16 PM, Richard (Rikki) Andrew Cattermole wrote:
>> There is a very good reason to prefer an attribute rather than new 
>> syntax, it doesn't break tooling.
> 
> True, but an attribute for constructors only seems rather odd.

Attributes are related to assumptions and guarantees, and the difference 
between a copy constructor and move constructor is the assumptions that 
the compiler is allowed to make.

For whatever reason, this feature just keeps giving me the nagging 
sensation that something isn't right with the motivation.



More information about the Digitalmars-d mailing list