Const Ideas
Craig Black
cblack at ara.com
Fri Nov 30 12:32:28 PST 2007
"Janice Caron" <caron800 at googlemail.com> wrote in message
news:mailman.206.1196453000.2338.digitalmars-d at puremagic.com...
> 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
I now better understand why you proposed this syntax. I guess it's not so
bad. I can't think of anything better.
More information about the Digitalmars-d
mailing list