How to break const
deadalnix
deadalnix at gmail.com
Wed Jun 20 06:46:42 PDT 2012
Le 20/06/2012 15:13, Christophe Travert a écrit :
> OK, that was not the right argument. Const is transitive according to
> the spec. Making it not transitive would break the mutable< const<
> immutable design. You're trying to make an exception for data hidden
> behind a delegate, which is a dangerous thing.
>
Nothing is const by itself. Things are mutable or immutable. const means
mutable or immutable. Things are const only in the eyes of code
manipulating the mutable or immutable data.
Immutable require to be transitive. Const need to respect immutability
transitivity. This means const transitivity most of the time, but in
fact, the real constraint is immutability transitivity.
More information about the Digitalmars-d
mailing list