Const Ideas

Janice Caron caron800 at googlemail.com
Fri Nov 30 12:02:51 PST 2007


Well, I'm still gunning for

    const (X)& x;

for mutable refs to const classes. Since I come from a C++ background,
& means "reference of" to me, and this reads straightforwardly as "x
is a reference to const X".

Of course, x would be a reference even /without/ the ampersand - such
is the nature of classes in D. But writing it explicitly allows one to
put it outside the brackets.



More information about the Digitalmars-d mailing list