[GRR] OutOfScopeNotification catching caught me

nicolas cellier ncellier at ifrance.com
Sat Apr 8 07:32:04 UTC 2006


Le Samedi 08 Avril 2006 01:33, tim Rowledge a écrit :
> On 7-Apr-06, at 3:46 PM, nicolas cellier wrote:
> > evaluate this silly example from a text editor:
> >
> > Object compile: 'outOfScopeExample
> >     true ifTrue: [| i | i := 1].
> >     ^i'.
> > ^Object new perform: #outOfScopeExample
>
> Squeak doesn't have proper closures. Your code is compiled exactly like
>
> |i|
> true ifTrue:[i:= 1].
> ^i
> The i is not actually out of scope, unlike in VW.
>
> tim

Tim, you have the right explanation, i do not contest that.

But try to fileOut the outOfScopeExample, or publish it in Monticello, and 
file it in again; or simply modify it from a Browser: you cannot.

That is what i contest: following one path, you can (incorrectly in my 
opinion), following another you cannot (what i think is a proper behavior 
even if the underlying implementation does not enforce closures).

Either you have to remove the OutOfScopeNotification and claim that this is a 
language feature, or you have to enforce the notification everywhere.

Current implementation have a hole and shouldn't remain as is.

Nicolas




More information about the Squeak-dev mailing list