Where would you put the return?
Anthony Hannan
ajh18 at cornell.edu
Sat May 24 18:21:25 UTC 2003
Andres Valloud <sqrmax at comcast.net> wrote:
> Anthony Hannan wrote:
> > In Squid, selectors will be more than just symbols. I'm considering
> > adding an attribute to Selector to indicate whether it returns a
> > value or not. All subclass/polymorphic methods would have conform
> > to this, and all senders would not be allowed to get the value of a
> > "procedure-only" selector. This will speed up returns a little
> > since only "function" methods will have to return something.
>
> I gotta say... why not put this effort into a JIT virtual machine that
> will figure whether the answer is being used or not at runtime and
> optimize appropriately? It just gets stuff of the way of the developer.
Sure. But I was thinking the real advantage of my scheme above was not
the potential added speed-up but the added structure to the program.
The compiler would catch misuses of selectors.
Cheers,
Anthony
More information about the Squeak-dev
mailing list
|