From: Robert Klemme Date: 2011-03-08T23:34:55+09:00 Subject: Re: Duplicate methods removal in Ruby's TODO ? On Tue, Mar 8, 2011 at 1:30 PM, David Unric wrote: > Hi, > > as you know for sure, Ruby defines several method aliases of base > classes to appeal/(make it easier to grasp) programmers comming from > different languages (Perl, Smalltalk, Lisp etc.). > > Array: >  'slice' and '[]' >  'collect' and 'map' >  'inspect' and 'to_s' These are not exchangeable. > Enumerable: >  'find_all' and 'select' >  'find' and 'detect' >  'entries' and 'to_a' >  'inject' and 'reduce' >  'include?' and 'member?' > > Hash: >  'store' and '[]' >  'each' and 'each_pair' >  'key?' and 'has_key?' >  'value?' and 'has_value?' >  'length' and 'size' >  'merge' and 'update' > > ... > > Just curious about possible removal of method aliases in a future ? I > know it would be very difficult decision to break backward > compatibility, but because these are synonyms/aliases it won't be too > hard to write conversion tool for existing sources. Why bother? This generates superfluous efforts because you gain nothing other than some abstract "cleanness" or removal of redundancy. > Is there same intention to clean Ruby's core libraries ? > When'll be the time, Ruby would need no more to attract programmers from > different envirnoments and start with cleaning out ? I don't think there are any such intentions. I'd strongly object to them if there were. This just does not give any benefit and there would be far better candidates for cleaning up (class variables should be banned for example). Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/