We mostly can. This is really an echo of the "read-only, not constant"
idea from a while back. This way you can take references to them, for
instance. The compiler doesn't know where they will go.
Overloading the assign-to-me operator is faster than having a flag, you
never have to check it.
Jeremy Howard wrote:
>
> > internally, how to do it:
> >
> > ASSIGNMENT, as in, Change-my-values-w/o-changing-my-type,
> > is in the vtable for the object.
> >
> > When an object becomes constant, its ASSIGNMENT function gets
> > replaced with
> >
> > $heres_what_it_gets_replaced_with=sub{
> > throw "ERROR-ASSIGNMENT-TO-CONSTANT"
> > };
> >
> > or something very much like that.
> >
> Can't we just replace the token with the actual literal at compile time
> (like we effectively do now)? I see this RFC as just a change of
> notation--what is it about it that requires a change of implementation?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?