On Fri, May 09, 2008 at 05:09:31PM +0200, Carl Mäsak wrote:
> Pm (>):
> > In Rakudo's case, we just haven't implemented read-only traits
> > on variables yet.
> 
> Goodie. I guessed as much.
> 
> >  But yes, I expect that it will be caught as
> > a compile-time error.
> 
> And do you agree it's reasonable to expect this of every compiler?

Reasonable to expect it, yes -- but whether or not this rises to the
level of being a "requirement in the spec" may be a different matter.

I could envision the possibility that some otherwise-very-capable
Perl 6 implementation might be better served by having such checks
performed at runtime (they have to be done there also) and leaving
compile-time checking as an optimization.  I suspect this is what
Pugs did.  Or an implementation might not have a clear-cut notion
of "compile time".

So, as long as the assignment is properly prevented, I think that
may be sufficient.  (If the language designers decide otherwise,
that's okay with me too. :-)

Pm

Reply via email to