On 02/16/2016 09:44 PM, Walter Bright wrote:
On 2/16/2016 5:35 AM, Dicebot wrote:
In my opinion @mutable would be a disaster of much higher destructive
impact than head const. I am very opposed to it no matter how it is
designed. Once you start considering it, you are better at simply
throwing away existing const system and starting it all from scratch
with D3. Logical const is harmful as it doesn't give and serious
guarantees but gives developer a false sense of confidence.
I agree with you on that, and I've argued from that position before.
Note that head const does not introduce any watering down nor
destruction of the const/immutable/sharing type system. The main
downside of head const would be language complexity.
I profoundly oppose such an outlook. It has a name - prejudice, pure and
simple. Rejecting possible future ideas "no matter what" even before
they exist is extremely damaging.
Consider:
"I oppose implicit narrowing conversions regardless how they are designed"
"static if is fundamentally flawed"
"Variadics cannot be both simple and safe"
etc.
Andrei