lua-users home
lua-l archive

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


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.

I always thought that very ugly.

Me too. I never user Algol, but I remember a language doing that (which one?), and I didn't liked it.

As for Pascal, it has neither of these. There, the body of
a control statement is just another statement, simple or
compound (begin -- end). An exception of this rule
(which introduces a bit of inconsistency in the language)
is the repeat -- end loop.

My apologies to Pascal. It is a long time since I was exposed
to it, but I remember it as verbose.

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.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --