Is This a Solution For the Const/Rebindable Issue?

Mehrdad wfunction at hotmail.com
Sun Jun 12 22:38:17 PDT 2011


== Quote from Steven Schveighoffer (schveiguy at yahoo.com)'s article
> On Mon, 13 Jun 2011 01:09:57 -0400, Steven Schveighoffer
> <schveiguy at yahoo.com> wrote:
> > No.  final is not a type constructor, so it does not get carried
around
> > with the type.
> >
> > final int i;
> >
> > assert(typeof(i) == int); // after the declaration, the storage
class is
> > gone from the type!
> >
> > int * ip = &i;
> Note, you might be able to forbid this line, but I don't think
this works
> well.
> -Steve


I completely realize that final is not a type constructor (I don't
want it to be one either), but I'm failing to what that has to do
with anything.

How does that fact affect my previous answer?


More information about the Digitalmars-d mailing list