help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] DynamicVariable in a Continuation


From: Derek Zhou
Subject: Re: [Help-smalltalk] DynamicVariable in a Continuation
Date: Thu, 26 May 2011 01:07:33 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]