Re: Can we simplify "end"?
- Posted by Jason Gade <jaygade at yahoo?c?m> Aug 08, 2007
- 649 views
jacques deschĂȘnes wrote: > > Personnaly it doesn't bother me to have to write the block type after end. > More I see it as as self documenting feature, when there is many level of > block > even with indentation its easier to locate where each block ends this way as > sometimes the block may be more than one screen full of lines. > > regards, > Jacques DeschĂȘnes > > > Bryan So wrote: > > > > I think it is quite redundant to use different endings for > > > > end procedure > > end function > > end if > > end while > > > > etc... > > > > with proper indentation, which I am sure we all use, one > > > > end > > > > should be enough to end a loop or condition or function, etc, > > without any ambiguity. > > > > Bryan Heh, usually I'll write a comment describing what I'm ending, be it function or procedure or loop or whatever.
procedure do_something(object x) -- something end procedure -- do_something()
"Any programming problem can be solved by adding a level of indirection."