Move Constructor Syntax

Walter Bright newshound2 at digitalmars.com
Mon Oct 7 06:37:18 UTC 2024


On 10/6/2024 11:20 AM, Lance Bachmeier wrote:
> what's wrong with a clear and simple 
> approach like
> 
> ```
> this(move S)
> ```

It looks similar to Rikki's @move syntax, which is already discussed.


> Any of the three you've proposed would add considerable overhead to someone 
> learning the language.

Unfortunately, a move constructor inevitably adds more to be learned. I don't 
know a way around that.


> I'm not a fan of even more syntax.

Neither am I. But I failed at finding a way to implement it without more syntax. 
I tried for several days.



More information about the Digitalmars-d mailing list