From: Joshua Schairbaum Date: 2008-01-17T04:54:20+09:00 Subject: Re: ruby annoyances ... mine is line continuation, what's yours? Don't all sentences _end_ with punctuation? On Jan 16, 2008, at 2:44 PM, scooterm@hotmail.com wrote: > Just thinking how really smart Ruby is in most areas makes it all the > more surprising when some of its "warts" start showing. Admittedly, > the ones that appear are pretty minor, but still a tad irritating > nonetheless. > > 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? Speak up, get it off your chest. > > --salutations >