digitalmars.D - Messing storage classes and type qualifier is a pain
- deadalnix (14/14) May 08 2012 Types qualifier (const, immuta...
Types qualifier (const, immutable, shared, inout) are currently mixed with storage classes (static, ref, whatever . . .). The current situation is potentially armful. type qualifier are part of the type, and always mean the same thing. Storage classes don't modify the type, depends on where they appear in code and change semantic. With a broader view, storage classes influence the declaration, type qualifiers the type. They are very different beasts. The fact that they can be mixed cause massive code duplication in any D frontend. This additionally create unnecessary duplication of identical semantics (ie const ref vs ref const ? ). I'm not advocating for removing this, because it would break code unneedlessly, but it should definitively be marked as a technical debt we have, and lesson have to be learn from it.
May 08 2012