From: David Alan Black Date: 2002-01-05T15:27:21+09:00 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 <