D const design rationale
Jeff Nowakowski
jeff at dilacero.org
Tue Jun 26 10:29:30 PDT 2007
Walter Bright wrote:
> readonly is a synonym for const, so no improvement there.
I think readonly is a much better mnemonic than const, especially
considering that const is often explained in terms of being a read-only
view. Yes, invariant can be described in terms of read-only too, but
const vs invariant look *exactly* the same to me, whereas readonly doesn't.
-Jeff
More information about the Digitalmars-d
mailing list