Context Sensitive Bindings (was Re: Exception Hierarchies)

Allen Wirfs-Brock Allen_Wirfs-Brock at Instantiations.com
Tue Aug 17 17:47:10 UTC 1999


At 01:28 PM 8/17/99 -0400, Stephan B. Wessels wrote:
>Allen,
>
>Wouldn't it be better to not name the class in it's own class methods?  I
realize you
>were citing examples.  Just want to make sure there's isn't some subtlety
going on
>here that would keep me from subclassing.
>

Steve is correct, the following would be more extensible:

"class methods"
named: bindingName value: boundValue do: aBlock
         "Evaluate a block in the context of a fluid binding"
         [aBlock] on: self "Fluid"
                   do: [:ex|
                         ex bindingName = bindingName ifFalse: [ex pass].
                         ex resume: boundValue]





More information about the Squeak-dev mailing list