From: Tom Copeland Date: 2007-07-12T10:18:12+09:00 Subject: Re: Beautiful Code : Pity he didn't ask here... On Thu, 2007-07-12 at 08:11 +0900, John Carter wrote: > I try to write the most readable code that is most readable by someone > who knows Ruby perfectly well. Right on. Today Rich Kilmer showed me some Rails code that Chad Fowler had written. It was something like: some_array.map(&:name) where some_array was filled with objects that had a name attribute, and Rails reopened Symbol and added to_proc. At first I thought "oh, that's ridiculous". Five minutes later I thought "hm, that's rather nice". Five minutes later I agreed with Rich that it was very clever and we would start using it everywhere :-) > Personally I would speak up to them. Scan the libraries for the best > code Rubiest have to offer in the Ruby idiom.... and spend my time > explaining the elegance, power and succinctness of it. Well said! Yours, Tom