lua-users home
lua-l archive

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

On Oct 21, 2015 10:22 AM, "Dirk Laurie" <> wrote:
> 2015-10-21 15:21 GMT+02:00 Roberto Ierusalimschy <>:
> > I may be missing something, but the following definitions in 'luaconf.h'
> > seem to do a good job of elliminating floats from Lua. A few caveats:
> I think the OP agrees that it is not hard, but is trying to push the notion
> that it is a sufficiently common Lua variation to justify being switched
> on with just a single -D. Imagine a cardiac pacemaker that is scriptable
> in Lua, that sort of thing.
I'd rather not! No offense to Lua, but it's not certified for use in safety-critical operations like that. Those kinds of things really should have very minimal software written in heavily reviewed and well-formatted MISRA C. The more code, the more potential for bugs. Just ask Toyota...


There are plenty of embedded (non-safety-critical) systems where an integer-only Lua might be useful, though. For example, some Nintendo DS games used such a modified version of Lua 5.1, since it lacked an FPU and was too slow to feasibly simulate one in software. (Not to be confused with the 3DS which does have an FPU.)

Such systems are becoming more common now too with cheap microcontrollers reaching the point where running Lua on them is feasible.