Where would you put the return?
tblanchard at mac.com
tblanchard at mac.com
Wed May 21 01:48:52 UTC 2003
I've always disliked methods that don't return anything. I like
Smalltalk's default of returning self. It allows for chaining messages
nicely. Something I find inconvenient in Java with its preponderance
of void methods.
On Tuesday, May 20, 2003, at 01:04 PM, 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.
>
> Cheers,
> Anthony
>
More information about the Squeak-dev
mailing list
|