#apply:from:to: (was: Re: Idea for a possibly better Collection
...)
Klaus D. Witzel
klaus.witzel at cobss.com
Tue Sep 12 21:12:46 UTC 2006
On Tue, 12 Sep 2006 22:36:30 +0200, Jon Hylands wrote:
> On Tue, 12 Sep 2006 20:27:24 +0000, "J J" wrote:
>
>> so are there any VM primitive writers out there who would be interested
>> in
>> tackling this? I'm afraid that this sort of thing is beyond me at the
>> moment. :) It seems like something that could make a big positive
>> impact.
>
> One of the obvious issues with writing this is the VM needs to be able to
> evaluate the block (arbitrary Smalltalk code) from within a primitive.
> I'm
> not sure how easy (or even possible) this is in Squeak.
Just activating a block from within the VM is nothing new, there are some
GOF primitives which do that already; take #value: <primitive: 81> as an
example-it's there for being reused.
I think that the problems lurk around another corner: all the kangaroo
cases, i.e. #on:do:, #ensure: and #ifCurtailed:, to name prominent
examples (also #primitiveTerminateTo and friends). And then there is
naughty stack manipulator named debugger.
But, fortunately, there is plenty of self-documenting code (with comments,
also methods based on Blue Book concepts), in the "process primitives"
message category of class Interpreter :)
> Later,
> Jon
More information about the Squeak-dev
mailing list
|