lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, 2005-08-29 at 10:45 +0200, Philippe Lhoste wrote:
> Gavin Wraith wrote:
> >> The `end-sth' property is present in Ada, Dylan and other
> >> languages. In some of them the additional word is not
> >> mandatory.
> >> Another option is the ending word being the reverse of
> >> the opening one: if -- fi, do -- od etc. Example is Algol 68.


> Well, Basic, at least Visual Basic, does that:
> End If
> End Sub
> End With
> End Select
> etc.
> Only End is mandatory, but I used to add the optional word all the time.
> Same for Next <VariableLoopName>, the variable being optional.

I always found this very useful - it meant that the compiler whinged at
if you got it wrong - it's useful for confirming where each structure
ends in your mind.  Alas, I don't think this kind of thing is possible
to be implemented optionally in Lua, as it is in Basic, as the compiler
wouldn't be able to tell the difference between the end or a beginning
of a block. :-/

Rob Kendrick