From: Karl von Laudermann Date: 2008-01-17T05:54:58+09:00 Subject: Re: ruby annoyances ... mine is line continuation, what's yours? On Jan 16, 2:41 pm, "scoot...@hotmail.com" wrote: > > Consider: > > puts 'cat :: dog :: elephant :: mouse :: gorilla'. > split('::'). > map{|str| str.strip() }. > select{|str| str['o']}. > join("\n") > > If you ask "why is this an annoyance" ... it's because you have > to put the period at the *end* of each item, even though some > prefer to put it at the beginning. When splitting a long line across an operator, I've always preferred to put the operator at the end, because it makes it obvious that the line isn't finished. Not just for the Ruby interpreter, but for the user as well. Even in Java, I prefer to write: int val = Foo.someLongThing() + Bar.otherLongThing(); even though Sun's official Java style guide dictates putting the + at the start of the second line.