Context of Execution

Brian T. Rice water at tunes.org
Tue Jul 18 09:37:06 PDT 2006


On Mon, July 17, 2006 11:34 pm, Jack Waugh said:
> In
> http://article.gmane.org/gmane.comp.lang.slate.general/226/match=context ,
> Shaping quotes Nicolas Pelletier as having said:
>
>> For example, a temporary variable declared in a method is semantically
>> a slot  of the method's  execution context. If that  method references
>> slots or  roles of  the receiving objects,  then it is  also necessary
>> that the  method context delegates  to the receiving objects  to allow
>> slots and roles resolution.
>
> If that is the case, why is it that when I type in
>
> Slate 71> [|x| x: slotNames. x includes: #x] do.
>
> the result is
>
> False
>
> ?  Shouldn't there be a #x slot in the context because of the temporary
> declaration |x|?  And shouldn't that slot's name, #x, appear among the
> slotNames
> answered by the context of execution (established by the #do) when it (the
> context) serves as the implicit first argument to the message #slotNames?

The manual is incorrect inasmuch as we never implemented that feature on
compiled bytecode methods - the form of the VM instruction set and method
format makes that awkward
(http://slate.tunes.org/repos/main/doc/bytecode.txt outlines block
format). However, it would be very easy to simulate it (since we can
define methods within the bodies of other methods), and there is nothing
preventing the addition, removal, and updating of other slots dynamically
using mechanisms other than the block header.

-- 
http://tunes.org/~water/brice.vcf



More information about the Slate mailing list