From: markus@... Date: 2004-10-08T08:36:27+09:00 Subject: Re: quality of error messages On Fri, 8 Oct 2004, Austin Ziegler wrote: > On Thu, 7 Oct 2004 07:39:04 +0900, Markus wrote: > > On Wed, 2004-10-06 at 15:19, Joachim Wuttke wrote: > > > Thank you, Brian. > > > This is quite a convincing example: I count not less than eight > > > places where the "end" could be missing. > > > Just for curiosity: why didn't Ruby borrow indentation semantics > > > from Python ? > > Now there's an RCR I'd support. Heck, I'd even volunteer to code > > it! > > I think you'll find more people who don't want such an abomination. > > Python's indentation is the number one thing that prevents me from > even considering using that language, because it forces me to work in > a stupid manner (e.g., *its* manner), rather than adapting to my > manner. *laugh* I supose the reason I like the abomination is I learned to indent back in the days of salient structure (before the matching-pairs abomination took over the world). To me (and by extension, all right thinking people), python's indentation seems perfectly natural. I suppose it's all a matter of what abomination you grew up with. That said, it really doesn't hurt as bad as you'd think it would, since the main thing people differ on is where to put the closing token (e.g., does the "end" or "}" go at the indentation of the enclosed block or the inclosing block) and that issue vanishes if you don't have closing tokens. I suspect that (if warned) most rubiests would find: class My_class attr_reader :an_atribute def initialize a1,a2 @an_attribute = a1 @counter = 0 @limit = a2 def feed_the_lion food raise "Roar" unless food.respond_to? :digestible_by raise "Grrr" unless food.digestible_by self digest food waffle = My_class.new :fred,14 perfectly readable (and writable) without all the syntactic clutter/noise. Required when you _don't_ pay attention to white space. Further, it's well established that when there is discord between them people (including long time lispers) will "read the indentation" and ignore the punctuation regardless, so it reduces a significant source of bugs to have the language look at the same features of the source code as the person did. About the only measured downside (IIRC) is that it increases the error rate when people are typing in code from a printed source. That doesn't happen nearly as much as it used to. BTW, I am _not_ trying to push this change; I'm just trying to explain why I would not object to it, and suspect that many others would find it more palatable than they might think. -- Markus