[Newbies] Should all methods return a value?

Charles D Hixson charleshixsn at earthlink.net
Tue May 9 06:09:36 UTC 2006


Todd Blanchard wrote:
> The rule is, if you don't return a value, then self is returned. 
> There's no such thing as a void message like in C++ or Java.
>
> Tell me what you want to do and I'll see if I can scare up some examples.
>
> On May 8, 2006, at 10:16 PM, Charles D Hixson wrote:
>
>> I know that in some languages this matters, and in others it doesn't.
>> ...
> ...
Returning self is fine.  I just wanted to know what would happen, so I
could do things properly.
(Actually, right not the methods would execute Object
shouldBeImplemented, so they probably won't really return anything...but
I was trying to plan for the future.)
Thanks.



More information about the Beginners mailing list