On Tuesday, 16 February 2016 at 01:04:44 UTC, Walter Bright wrote:
2. supports single assignment style of programming, even if
the data is
otherwise mutable
Like 'final'? We did get rid of that...
Maybe we should resurrect it.
I'm trying to say it politely.
D2 const story is more complicated than its competitors.
Both D1 "final" and C++ const always felt more useful and
practical to me that the whole D2 immutable/const/inout thing.
The current scheme seems to have marginal value in practice, lots
of complexity, and is harder to use well (Unqual, inout) etc.
Constructors can break it. I don't know why we should be that
happy about our constness, maybe someone can explain.