Where would you put the return?

Daniel Vainsencher danielv at netvision.net.il
Sat May 24 20:39:17 UTC 2003


At the cost of adding a kind of declarations. Sounds like a pretty bad
deal to me. Do you intend to declare int vars, too? 

Daniel

Anthony Hannan <ajh18 at cornell.edu> wrote:
> 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