Re: [Pharo-dev] doing stupid things (image will become unusable)

2016-06-01 Thread Nicolai Hess
2015-12-14 16:30 GMT+01:00 Richard Sargent <
richard.sarg...@gemtalksystems.com>:

> Nicolai Hess-3 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?
>
> 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.)
>
>
>
Created a fobgubz entry:

18376

Do not allow assignments to global vars



>
>
>
> --
> View this message in context:
> http://forum.world.st/doing-stupid-things-image-will-become-unusable-tp4866090p4866994.html
> Sent from the Pharo Smalltalk Developers mailing list archive at
> Nabble.com.
>
>


Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-14 Thread Richard Sargent
Nicolai Hess-3 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?

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.)





--
View this message in context: 
http://forum.world.st/doing-stupid-things-image-will-become-unusable-tp4866090p4866994.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-09 Thread Marcus Denker

> On 09 Dec 2015, at 22:23, Nicolai Hess  wrote:
> 
> 
> 
> 2015-12-08 17:44 GMT+01:00 Marcus Denker  >:
> 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. 
> 
> 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



Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-09 Thread Nicolai Hess
2015-12-08 17:44 GMT+01:00 Marcus Denker :

> 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.
>

by the way, what is the difference between
LiteralVariable :
isGlobal
and
isGlobalVariable
?


>
> Marcus
>
> On 08 Dec 2015, at 17:33, Guillermo Polito 
> wrote:
>
> 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.
>
> On 8 dic 2015, at 5:29 p.m., Marcus Denker  wrote:
>
> 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
>
> On 08 Dec 2015, at 17:19, 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?
>
>
>
>
>


Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-09 Thread stepharo



Le 8/12/15 17:29, Marcus Denker a écrit :

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.


Please it would be gorgeous :)



Marcus

On 08 Dec 2015, at 17:19, 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?







Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Robert Withers
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?






Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Marcus Denker
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

> On 08 Dec 2015, at 17:33, Guillermo Polito  wrote:
> 
> 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.
> 
>> On 8 dic 2015, at 5:29 p.m., Marcus Denker > > wrote:
>> 
>> 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
>> 
>>> On 08 Dec 2015, at 17:19, 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?
>>> 
>> 
> 



Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Guillermo Polito
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.

> On 8 dic 2015, at 5:29 p.m., Marcus Denker  wrote:
> 
> 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
> 
>> On 08 Dec 2015, at 17:19, 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?
>> 
> 



Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Marcus Denker
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

> On 08 Dec 2015, at 17:19, 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?
> 



Re: [Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Guillermo Polito
I had this semester a lot of students having the same problem…

I’m +1 to fix it.

> On 8 dic 2015, at 5:19 p.m., 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?
> 



[Pharo-dev] doing stupid things (image will become unusable)

2015-12-08 Thread Nicolai Hess
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?