From: "Jean-François Trân" Date: 2008-01-17T05:20:38+09:00 Subject: Re: ruby annoyances ... mine is line continuation, what's yours? 2008/1/16, scooterm@hotmail.com : > Line continuation is probably the biggest annoyance for me so far. > > 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. Why? Because it makes it easier > to remember to put in the code, you dont have to scan a bunch > of varying-length lines to see if you remembered to put the > dot at the end, ... and don't even think about adding "line > continuation escapes" like a backslash ... they're ugly and > they suck. > > Anyone else have an annoyance they want to share? ... or better > yet, a fix for this one? You can insert spaces before or after the dot, so for instance, you can format your code to make the dots vertically aligned. See : http://pastie.caboo.se/139710 So it's easy to check if a dot is missing. -- Jean-François.