From: Mark Hahn Date: 2002-01-05T15:47:03+09:00 Subject: [ruby-talk:30272] Re: Indentation (was: should I use ruby instead of perl) All six ends could be left off with no ambiguity. The EOE is grouped into a string at a low level, so it is parsed seperately from the outer code. The first three ends would be added by the parser when the string eval happens and the last three at the main eval. You must admit that 6 ends in a row conveys no information to the reader. That is my definition of noise. If you think that use of the vertical space is "prettier", then I cannot argue with that. -----Original Message----- From: David Alan Black [mailto:dblack@candle.superlink.net] Sent: Friday, January 04, 2002 10:27 PM To: ruby-talk ML Subject: [ruby-talk:30269] Re: Indentation (was: should I use ruby instead of perl) Hi -- On Sat, 5 Jan 2002, Mark Hahn wrote: > > If the tail end (line going left) is all 'end' and '}' lines, then it could > look like this: > > > \ > \ > \ > \ > \ > \ > \ > | > | > > which is much shorter. The reason is that if you hit the end of the file, > or a def, module, or class keyword, all closing lines could be inserted by > the compiler for you, instead of giving an error like it does now. > > I discovered this trick a long time when TI claculators would allow input > such as: (5*(3+2 (no closing parens were needed). > > I hate it when I see a third of my lines filled up with closing lines > (noise), and I don't like the column restrictions that Python forces on you. > This solution would have the clean look of python without the column line-up > restriction. I actually like having end and } tokens, and do not advocate getting rid of them. So this response, for me, is just for technical interest :-) I'm not sure how a parser operating as you describe would be able to handle something like this: module Outer class Thing def initialize instance_eval <