[Pharo-project] about OutOfScopeNotification

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


Stef,

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.

Bill


________________________________________
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

Hi

I was reading  Issue 2436:      Compiler outofScopeNotification
        http://code.google.com/p/pharo/issues/detail?id=2436

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

while

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

just returns Object

Stef





More information about the Pharo-project mailing list