lua-users home
lua-l archive

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


On Mon, Sep 13, 2010 at 10:19 AM, Pierre LeMoine <yarr.luben@gmail.com> wrote:
> The ternary operator thread seems to attract a lot of interest, but i
> think that a more elaborate error system is way more important. And i
> wouldn't mind seeing finalizers either.

Yes, there have been discussions about 'deterministic finalization'
and that would be a killer feature.

The idea that any block can have an 'except' or 'catch' clause is
attractive, although only if it does not cost anything. It's
fashionable to knock C++ (it's so knockable) but they have a maxim,
'Don't pay for what you don't use'.  So maybe an explicit
try..catch..finalize is needed to indicate that we are prepared to pay
the costs for exception handling.

5.2 already breaks compatibility, which is a cost, so we still need
some compelling new features to balance the books (IMHO of course)

AFAIK, there is already some support for error objects which are not
strings. Then building exception hierarchies should not be difficult.

steve d.

PS. This may be dismissed as 'language envy' but most people in the
game have recognized that exception handling is a good way to
structure complicated programs and separate 'exception' code from the
'usual cases'.