lua-users home
lua-l archive

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


Pierre-Yves Gérardy wrote:
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

Please forgive me if I give the impression to push people, it's not my intent, but IMHO it could be worth consider a form of coordination (merging?) of different FAQs, like that excellent unofficial FAQ by Steve Donovan:

http://batbytes.com/luafaq

Best Regards,

--
Lorenzo