RfC for language feature: rvalue struct

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Jan 31 18:13:58 UTC 2023


On Tuesday, 31 January 2023 at 13:02:57 UTC, FeepingCreature 
wrote:
> Okay, now how do you do that without causing GC load? :) Keep 
> in mind that we plan to use this for very inner loops of 
> not-always-cheap algorithms.

Why can't you use regular encapsulation?

I think it would be better for you to see if you can do this is 
as a rewrite instead as that doesn't affect the type system.

E.g. C# introduced "record" in addition to "struct" and "class" 
to get slightly different value semantics, but as far as I can 
tell it is only a rewrite.



More information about the Digitalmars-d mailing list