Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Me Here
John M. Dlugosz wrote: Carl Mäsak cmasak-at-gmail.com |Perl 6| 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.

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Carl Mäsak
Me Here (), John (), Carl (), Patrick (): 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? I think that is the point of declared types. But, something like no strong_type_check :rw in scope can

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Brandon S. Allbery KF8NH
On 2008 May 15, at 1:30, Me Here wrote: John M. Dlugosz wrote: no strong_type_check :rw in scope can turn that off, in case you want to play dirty tricks. What is the point of be able to mark things readonly if the compiler does reject assignment attempts? (assuming you meant doesn't)

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Me Here
Carl Mäsak wrote: What is the point of marking things readonly if you can turn it off? There are many possible reasons, I think. * The code that declares the variable readonly might not be available to you (compiled to bytecode, fetched by RCP etc), * or it might be available but used

Re: All classes imply the existence of a role of the same name.

2008-05-15 Thread John M. Dlugosz
Overloading final was Java's rather inept attempt to define objects with value semantics rather than container semantics Can you tell me more about that, or point to something?