RfC for language feature: rvalue struct
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Feb 1 09:29:01 UTC 2023
On Wednesday, 1 February 2023 at 07:46:24 UTC, FeepingCreature
wrote:
> Maybe it can be done as a rewrite?
[…]
> But this is not quite the semantic we actually want because,
> for instance, the accessors will still run the invariants,
> which is pointless because we know the fields won't ever change
> after the constructor call, and also the function call itself
> is just useless. But that's the interface we want, at least.
Hm, anyway, if you can do it as a rewrite then you should be able
to implement it in the parser and in the runtime. That way you
can maintain it even if it isn't added to the core D language.
(If you are interested in something like this, just send me an
email.)
More information about the Digitalmars-d
mailing list