swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

self or void?


From: famasce
Subject: self or void?
Date: Thu, 13 Apr 2000 11:38:38 +0200

When a method doesn't return any value and simply changes the internal state
of an object, 'return self' is often used instead of 'return void' (and the
return type is changed accordingly). I've never reflected much on this, also
because it's a common practice in Swarm programs, but now I feel the need to
know: what's the advantage (if there's one) of returning self instead of
void?

Fabio.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]