On 2/2/06, Hal Fulton <hal9000 / hypermetrics.com> wrote:> doug00 / gmail.com wrote:> > Yes I really like the end statements, and they make it easier for> > beginners.  It's possible to support both indenting and end statements> > (i.e. support one mode or the other), and you don't need python's> > redundant and unnecessary colons.  I implemented this myself in a> > parser.  I don't think it is appropriate for ruby, however.> >> > What would be even better would be to allow optional labels after end> > statements, such as "end class", "end def", so the parser can catch> > more errors.> > I've implemented this as well in a separate project.> >>> Not a bad idea in itself. In fact, I think that really old Ruby> versions (prior to my learning it with 1.4) did something like> that. When modifiers were introduced (x if y, x while y, etc.)> parsing became difficult and they were dropped. I think that's> the case.
Even if "end if" is no longer feasible to parse because of the ifmodifier there is still the possibility to have optional "end def" and"end class" instead of just "end". It could make finding the placewhere an end is missing much easier.
Michal