"Robert Klemme" <bob.news / gmx.net> said:
>
> "Dave Burt" <dave / burt.id.au> schrieb:
>> [Multiple returns are] often quite disobvious, and I'm sure there are 
>> cases where it would seem more obvious to modify an argument "in-place", 
>> even though "that's not possible in Ruby".
>
> Personally I prefer to not have in place modification.  If you view a 
> method as some kind of (mathematical) function, then there's an input and 
> an output.  Returning values via arguments (= input) feels a bit awkward 
> to me. It has to be done in other languages because they don't provide 
> multiple return values; unfortunately this can make code hard to read. 
> But since Ruby actually has mutliple returns, I personally prefer to do it 
> that way.

I agree - arguments = input, return value(s) = output generally makes stuff 
clear.
That kind of simple function is a great idea most of the time, but there are 
cases where the obvious thing (obvious -> POLS) is for a side-effect to 
occur. Good examples of this in standard Ruby include Kernel::puts and 
String::sub!

Cheers,
Dave