3 ms·
Looks like you got some down votes but I entirely agree. It isn't as bad as JavaScript, but turning typos into nil rather than raising an exception or having a
by chubot 10y ago
Looks like you got some down votes but I entirely agree. It isn't as bad as JavaScript, but turning typos into nil rather than raising an exception or having a compile time error is also annoying, in addition to the other things you mentioned.
I really wanted to like it for the small and simple implementation, but the language isn't pleasant IMO.
- john_reel 10y agoThere are reasons for that. Have you considered using something like luacheck?
- lukego 10y ago> turning typos into nil rather than raising an exception or having a compile time error is also annoying So true. However, you can disable this behavior and then just forget about it: http://metalua.luaforge.net/src/lib/strict.lua.html http://metalua.luaforge.net/src/lib/strict.lua.html
- catwell 10y agoI have to agree here, however this is mostly not an issue if you use luacheck, assertions and unit tests. Still, stronger typing would help, and this is why several people are working on adding gradual typing to Lua. The main initiative is probably https://github.com/andremm/typedlua https://github.com/andremm/typedlua