From: Robert Klemme Date: 2011-03-09T07:20:36+09:00 Subject: Re: Duplicate methods removal in Ruby's TODO ? On 08.03.2011 18:14, David Unric wrote: > Robert Klemme wrote in post #986190: >>> ... >>> >>> 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). > > I'd guess reasons are obvious. You have to remember not only method > names but also their aliases you personally do not use just for the > sake of understanding other's source code. It does make you not a bit > more > productive. I'd prefer to spare my memory for much more important and > useful things. If your memory gets low you can always swap that page out and reload it from "ri". :-) > If you'll have to analyze thousands of lines of code even with > inconsistent mix-up of both method aliases, your oppinion would > certainly change. That does not match my experience. Usually code from the same author is consistent. If of course you are dealing with classes which have multiple authors then that might explain the mixup. Even then I don't find it particular difficult to recognize methods that I usually not use (#collect for example). Even if it's different for you I do not find that your particular hardship justifies creating work for all others who would have to adjust their library code plus change their habits. The first thing that would happen anyway is that someone publishes a gem with introduces all those methods again - and people write their code as before. Why do people so often put so much energy into trying to convince other people that the language or the core library needs to be changed - instead of just accepting things as they are and going with the flow? This is suggestion of yours is a typical case where it is immediately obvious that it has little chance of ever being realized - so why try to push it? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/