Const Ideas

Janice Caron caron800 at googlemail.com
Fri Nov 30 22:35:46 PST 2007


On 11/30/07, Jason House <jason.james.house at gmail.com> wrote:
> Craig Black wrote:
> Technically, I proposed the syntax.  Janice didn't like it at first but has
> now come full circle.

That's right. I think my earlier attempt was something like
"const(X)ref" or "ref const(X)". I came full circle and now fully
support Craig's idea, largely because I think there may come a time in
the future when D has C++-style references. If and when that day
comes, "&" will be preferable to "ref" for the same reason that "*" is
preferable to "ptr". If it's /only/ classes we're talking about, it's
no big deal either way, but if referencing gets more ubiquitious in
the future, less typing => better.

So Craig gets the kudos for invention on this one. Nice one, Craig!



More information about the Digitalmars-d mailing list