On Thu, May 26, 2011 at 08:54:41AM +0200, Paolo Bonzini wrote:
> On 05/26/2011 12:29 AM, Derek Zhou wrote:
> >I am not very good at naming, but can we keep DynamicVariable a subclass of
> >Notification, and provide 2 methods:
> >use_during_: for the fast way by making use a ProcessVariable
> >use_inside_: for the slow way of stackframe backtracing.
> 
> Interesting idea if it can be implemented!  But how would #value
> know which one to use?  The slow thing is not _setting_ the
> variable, it is _reading_ it, and it seems to me that without doing
> stack inspection you cannot know whether you are in a #use:inside:
> block.
> 
Ok we can keep one use_during_: method, but set it both ways. Then we can
provide a value: method for the fast path and a slowValue: method for the
slow path. It is not very elegent but at least the user have a choice. 

Derek

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to