From: "Martin J. Dürst" Date: 2011-01-28T14:50:00+09:00 Subject: [ruby-core:34929] Re: make ruby support line continuations ? Others have made many valid comments. I also agree that having commas at the start of a line looks very unnatural. It hinders rather than helps readability. Having all these commas in your face feels somewhat like Lisp with all the (((()))). Also, the chance of errors when missing a comma, and the cost of fixing, is not a problem. Acually, Ruby 1.9 introduced the possibility of using a '.' at the start of a line. But I think the dot is quite a bit different. The comma is used in virtually the same way as in natural language, for enumeration, whereas the dot is completely different from the period used in natural language. Also, with something like the example you gave, the main structure is the {...}, the the next important thing are the individual options (or other hash keys). This is different from method chaining, where array.collect { }.group_by { }.sort_by { }... puts the '}' at the front, whereas the most important information is the method name, and it's important to distinguish between array.collect {} group_by {} sort_by {} ... (three or more individual method calls) and array.collect {} .group_by {} .sort_by {} ... (three or more chained method calls). Also, for this case, there is no closing parenthesis for the overall chain, which means it helps a lot to look down the front and see how far the dots go to know where the chain ends. Regards, Martin. On 2011/01/27 15:15, Marc Chantreux wrote: > hello, > >> $ ruby -v; ruby fred; cat fred >> ruby 1.9.2p94 (2010-12-08 revision 30140) [x86_64-darwin10.5.0] >> options = { # defaults >> source_dir: '/usr/share/vim/addons' \ >> ,system_dir: '/var/lib/vim/addons' \ >> } > > I just compiled and tried: it works and that's good. But actually i > still wonder why those \ are mandatory and think my initial question is > still relevant. don't you think having punctuation as start of line is > a good way to avoid the \ noise ? > > regards > marc > > -- #-# Martin J. D�rst, Professor, Aoyama Gakuin University #-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp