Mark Volkmann wrote: > On 1/19/06, Kenneth Collins <pine29 / myfastmail.com> wrote: > >>John, pick out the way to do something that seems most natural to you >>and get familiar with that. Then ignore the rest. I think Ruby's "more >>than one way to do it" was intended as a blessing, not a burden. > > > That's not really good enough though. I you ever have a need to read > Ruby code that someone else wrote, you'll have to understand every way > to do something. I love Ruby, but I'm not yet a fan of having many > ways to do something unless there are cases where each possible > approach is better than the others. How many different ways are there for doing various tasks? 2? 3? For how many fundamental operations? Do the variations follow some general pattern or principle? Can anyone offer examples of multiple ways of doing something fundamental, and point out where it may be confusing? I've read complaints about Ruby allowing both if/then and unless/then, as well as the option to put the test either at the start or end of the expression. I don't find this a remarkably complex idea, but perhaps if it is poorly introduced then the options may seem arbitrary. > > A particular thing I dislike is synonyms for methods in the built-in > classes. Sure I can choose to use the method name that makes the most > sense to me, but I still have to be aware of all the synonyms so I can > read code that others wrote. In the long run I'd rather have to periodically go to ri or ruby-doc to learn something if it means I can choose message names that better express my intentions. James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - The Journal By & For Rubyists http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools