blocks (was: Caper needs Self Help)
Jecel Assumpcao Jr
jecel at merlintec.com
Wed Nov 19 17:22:52 UTC 2003
On Tuesday 18 November 2003 21:48, Mike Austin wrote:
> A huge complication? Aren't block closure's just anonymous methods
> (which are objects) with their proto set to their enclosing
> environment? I thought it was something like this in self.
It does look simple when you put it that way.
But what is "their enclosing environment"?
A) The method object in which the block literal is stored?
B) The closure/context/activation object cloned from A in which the
"push literal" bytecode is actually executed?
And who are we talking about in "their proto (parent, actually) set to"?
1) The block literal object?
2) The result of referencing 1 with a "push literal"?
3) The block closure resulting from sending 'value' to 2?
In Self, we set the parent of 3 to point to B and that is far more
complicated to arrange than I would like. Sadly, simplifying this
normally leads to a loss of important functionality (like being able to
send 'value' more than once to one of your block arguments or recursive
invocation of blocks).
-- Jecel
More information about the Self-interest
mailing list