From: Clemens Hintze Date: 2000-12-31T01:10:02+09:00 Subject: [ruby-talk:8359] Re: Ruby implicit return values (was: Re: open3 woes) >>>>> "Kevin" == Kevin Smith writes: Kevin> Dave Thomas wrote: (...) Kevin> I'm still developing my coding style for Ruby. I've been Kevin> hit by problems similar to this several times, where either Kevin> a) I've counted on a return but none was specified, so it Kevin> was unpredictable, or b) I wanted the method to be Kevin> considered "void" [C++ background speaking]. Kevin> So I've considered having a policy that *ALL* methods will Kevin> return something. For those that don't have a meaningful Kevin> return value, they should have either "return nil" or "nil" I would propose to return 'self' then. At least it let you use that method in method chains. I would only return 'nil' in methods that are defined/used as function fakes (private in class Object). (...) Kevin> Has anyone else been frustrated by this sometimes- handy Kevin> "feature" of the language? Not really yet! :-) Kevin> Kevin \cle