From: Jan Lelis Date: 2010-07-11T20:37:19+09:00 Subject: Re: what about allowing to specify, which end belongs to which start? Thank you for all the opinions :) Robert wrote: > endclass > endmodule > enddef > endbegin > endif > endunless > endwhile > enduntil > endfor > enddo > endcase > > Did I miss one? > > Each of those would be then alternatively allowed to "end", so you could > write > > begin > if foo > else > case x > when y > when z > endcase > end > endbegin > > I still don't like it. > I agree, that does not look good. But with a little punctation, it becomes more readable: begin if foo else case x when y when z end~case end end~begin Also compare the readability of the whole list with the token version: end~class end~module end~def end~begin end~if end~unless end~while end~until end~for end~do end~case The token version might be easier to implement, but I think, it is not satisfying. Caleb wrote: > I could write a RubyLexer-based preprocessor which does this pretty > easily. However, I'm not terribly motivated. This doesn't seem like > that useful a feature to me and I've got so much else to work on.... Cool :). I also want to try to implement it in some way, but at the earliest in about a month (also have too many things to do). @Brian Thank you for this neat 1.9 indention warning hint :)