[Pharo-project] about OutOfScopeNotification

Schwab,Wilhelm K bschwab at anest.ufl.edu
Sun Nov 14 23:13:46 CET 2010


Are you concerned that an error is raised, or over exactly which error is raised?   The code

    | b c |
    b := [ :Object | Object ].
    c := b value: Object.

is something that I would rather not have compile.  Perhaps it should, just as one is free to evaluate

  Object := 'this is really a bad idea to evaluate'.

but the latter is at least akin to shooting one's foot with a clearly-marked weapon.  Using Object as a temp name is not something that I can ever see as a good idea, but assignments to globals have uses.


From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse [stephane.ducasse at inria.fr]
Sent: Sunday, November 14, 2010 4:57 PM
To: Pharo-project at lists.gforge.inria.fr Development
Subject: [Pharo-project] about OutOfScopeNotification


I was reading  Issue 2436:      Compiler outofScopeNotification

which I integrated in 12240

and I still do not get why in Squeak or pharo now

| b c |
b := [ :Object | Object ].
c := b value: Object.

raises Unknown variable Object


| b c |
b := [ :x | x ].
c := b value: Object.

just returns Object


More information about the Pharo-project mailing list