Daniel Berger wrote:


> To accomplish both in one stroke, use the 'print' method (or whatever u want
> to call it):
> 
> # receiver modified, uniq_vals contains unique values
> uniq_vals = array.uniq.print


a little clumsy IMHO


>       b = a.copy
>       b.map {|e| e + 3}
>       return b


That's too much code required IMHO. Eiter return a copy (map) or modify 
the receiver (map!), each one short line.

I'd like to see the highest possible level of consistency with bang! and 
copying methods; that would save newbies some hair.


> The other solution, to cut the gordian knot so to speak, would be to just
> make the Ruby interpreter understand that an exclamation point at the tail
> of any method name indicate that the receiver should be modified in place.
> This would make our lives easier,


... and that of many newbies. A clear concept, consistently implemented, 
reduces errors. Less bad surprises, less to read, more fun.

(And please nobody tell me this stupid "... is the hobbgobblin of little 
minds." Great minds don't want to be filled with and distracted by 
inconsistencies.)

Tobi


-- 
http://www.pinkjuice.com/