[ruby-talk:02446] Re: Could missing 'end' be reported better?

From: "Conrad Schneiker" <schneiker@...>
Date: 2000-04-11 07:12:22 UTC
List: ruby-talk #2446
From: Hugh Sasse Staff Elec Eng > Could it be done without the space:
> def thingy
>            ...
> enddef
>
> and endif, endwhile, endfor, ...   This would be easier for the
> parser to cope with than separate words, I think.  The disadvantage
> is that it introduces more keywords, but I think the advantage of
> protecting programmers from themselves is worth it.  With deep nesting
> this is a big help.  I often put things like
>
> }; // end for
>
> in C++ for this reason, but it is better to have this in the code than
> the comments, because the parser can nag you about it.

Well, I put this as, "the ever-helpful Ruby parser could then save you time
and frustration and thereby make your programming life more wonderful".

Anyway, I am in favor of this feature.

If not this time around, then I would certainly like to see this in Ruby
3000. :-)

Conrad


In This Thread

Prev Next