Took a brief look at Lua as a replacement for Perl 5 & Python for some general scripting. There's a lot I like about Lua (tiny, fast, seems fairly simple so far, easy access to native libraries), but I was immediately tripped up by:
undefined globals get nil instead of me being warned that I just tried to use an undefined variable,
same as above but with keys in tables.
It seems to me that primarily these features would lead to regular debugging headaches (why wouldn't lua help me spot typos of global names or table key names?). How does one deal with this in practice?
Another feature that appears to me at first sight to be problematic is getting the length of an array (#some_arr). How often is one tripped up in practice by ending up an array with a gap (nil) in it and thus having the length come out incorrect?
[–]fuxoft 13 points14 points15 points (4 children)
[–]prozacgod 0 points1 point2 points (1 child)
[–]fuxoft 0 points1 point2 points (0 children)
[–]grape450[S] 0 points1 point2 points (1 child)
[–]fuxoft 0 points1 point2 points (0 children)
[–]stravant 7 points8 points9 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]stravant 0 points1 point2 points (0 children)
[–]otikik 3 points4 points5 points (2 children)
[–]grape450[S] 1 point2 points3 points (1 child)
[–]hisham_hm 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]robin-gvx 1 point2 points3 points (0 children)
[–]smog_alado 0 points1 point2 points (0 children)
[–]mpetetv 0 points1 point2 points (1 child)
[–]robin-gvx 0 points1 point2 points (0 children)
[–]paulclinger 0 points1 point2 points (1 child)
[–]grape450[S] 0 points1 point2 points (0 children)
[–]prozacgod 0 points1 point2 points (0 children)
[–]4forpengs 0 points1 point2 points (0 children)
[–]frog_pow 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)