Object := nil you can evaluate that piece of code, but afterwards .... Opal checks for assignments to read only variables (method arguments for example) Should all Globals (OCLiteralVariable with isGlobalVar == true) be read only ? |
I had this semester a lot of students having the same problem…
I’m +1 to fix it.
|
In reply to this post by Nicolai Hess-3-2
Hi,
There used to be a mechanism for that (readonly variable bindings). It was there but not used: half the globals where readonly, all globals added after the experiment was done where “normal”. With the new “first class” variables we could easily add that back in a clean way. Marcus
|
I remember. But what I do not remember is if the compiler was aware of it. I remember you had these ReadOnlyVariable, subclass of association that redefined #value:. You were however still capable of doing: MyReadOnlyVar := 1.
|
Yes, I wondered why it was not done in semantic analysis… would be much easier.
The binding approach only takes care of reflective change (Smalltalk globals at: Object put: nil), a case that is not as important to fix. (reflection is dangerous, disallowing just this one operation does not help). We should do some experiments. Marcus
|
In reply to this post by Nicolai Hess-3-2
i AM MORE INTERESTED IN WHAT STATE HER CONSCIOUSNESS IS INAFTER TRICKING
HER? If there is true loss of perceptory connection with the mirage, real pratyahara, there may still be a seed of meditation, so called Sabija Samadhi. It is not clear to me whether there actually is - messages sent without an Object??? Or is it blocked from finishing that operation and so there is no Nirbija Samadhi, not to speak loudly of Dharma Megha Samadhi! Wir Sind Tot! Alice ist jetzt Bardo! Nameste . On 12/08/2015 11:19 AM, Nicolai Hess wrote: > > Object := nil > > you can evaluate that piece of code, but afterwards .... > > Opal checks for assignments to read only variables (method arguments > for example) > and signals an error if you try to modify those vars. > But it does not check globals. > > Should all Globals (OCLiteralVariable with isGlobalVar == true) be > read only ? > or can we distinguish global vars and class bindings? > |
In reply to this post by Marcus Denker-4
Le 8/12/15 17:29, Marcus Denker a
écrit :
Hi, Pleassssssssse it would be gorgeous :)
|
In reply to this post by Marcus Denker-4
2015-12-08 17:44 GMT+01:00 Marcus Denker <[hidden email]>:
by the way, what is the difference between LiteralVariable : isGlobal and isGlobalVariable ?
|
This is a leftover / to be cleanup method from the change to allow variables to get meta-links. I should clean that up. The problem is that after the month in Chile I now have to work on all the things that I postponed (and other boring stuff). Marcus |
Administrator
|
In reply to this post by Nicolai Hess-3-2
I hope you will distinguish between class bindings and variable bindings (to classes). e.g. StringClass :=String. and StringClass := Unicode. should continue to be usable. (Assuming that classes named #String and #Unicode do exist, of course.) |
2015-12-14 16:30 GMT+01:00 Richard Sargent <[hidden email]>: Nicolai Hess-3 wrote
|
Free forum by Nabble | Edit this page |