lua-users home
lua-l archive

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


It was thus said that the Great Andrew Starks once stated:
> 2: Lua is a dynamic scripting language. As such, it should rarely ever
> crash. Favoring a crash over an uncaught-nil bug is too close to type
> checking to be a valid approach in an environment that is dynamic,
> wherever possible.

  I'm currently using Lua to process SIP messages, where each message is
handled in a coroutine (each runs until it blocks awaiting a result
(switching to another running coroutine), or until it finishes).  There are
the occasional uncaught-nils, but they bring to light an actual bug (usually
a typo of the type that is caught at runtime) or some previously unthought
form of input.  The uncaught nils just kill the coroutine, not the entire
program.

  -spc