DIP 1018--The Copy Constructor--Final Review

Kagamin spam at here.lot
Sat Mar 2 16:41:42 UTC 2019


On Friday, 1 March 2019 at 13:59:41 UTC, Olivier FAURE wrote:
> So, the big point of contention seems to be the possibility 
> that structs have copy constructors taking non-const arguments.

I suppose it stems from the belief that mutable references are 
bad. Which is caused by a lack of explanation why bad. This is 
why design decisions should have explanations, otherwise people 
will guess the explanation, and they will guess incorrectly, and 
they will believe in what they guessed, and they will resist to 
change their beliefs, much pain ensues, it already happened, and 
keeps going. One guessed that it's non-intuitive, the other 
guessed that mutation is bad, the third guessed that const is 
bad. If RefCounted should mutate on copy by necessity, then it 
should mutate, no need to rationalize the opposite.


More information about the Digitalmars-d mailing list