lua-users home
lua-l archive

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


Following the floating point discussion, I tried to look for a compilation of the various gotchas Lua beginners encounter, but I couldn't find one, so I decided to compile one...

Right now, I can think of two of them:

- Floating point inaccuracies. A simplified version of Patrick Rapin's "math.compare (x,y,delta)" [1] could be proposed as a workaround.
- The fact that you have to declare locals before using them.


Are there other potential traps? On what did you stumble while learning the language?

Kind regards,
-- Pierre-Yves

1. http://article.gmane.org/gmane.comp.lang.lua.general/71397