First Draft: Static Single Assignment
Walter Bright
newshound2 at digitalmars.com
Sun Nov 23 09:45:00 UTC 2025
Ironically, C++ head const is routinely used "as if" it was transitive const (as
C++ has no way to specify transitive const). In my experience with C++ (and C),
types that are legitimately "pointer to const pointer to pointer to int" are
extremely rate.
This is a giant hole in C++'s type system.
Some C++ programmers make use of this to create "logical const" objects, where
they pretend it is constant when it isn't. It is used for self-initializing
objects. There are better ways to do this, though. And lying to the user is not
a good strategy.
It isn't a good idea for D to adopt this.
More information about the dip.development
mailing list