4 ms·
The 1-based arrays are theoretically annoying (I'm a C guy), but in practice I find they simply aren't an issue, I guess due to the differences in typical progr
by snogglethorpe 14y ago
The 1-based arrays are theoretically annoying (I'm a C guy), but in practice I find they simply aren't an issue, I guess due to the differences in typical programs for each language. "~=" is unusual (I too wish it used "!=") but other than that, Lua's pretty much like everybody else (":" doesn't really count because it's an operation that doesn't exist in most languages).
"Global by default" can be annoying, but at least it's better than "local by default" like python etc. [As a programmer, who'd rather find bugs easily than save some typing, I think better than either would be "nothing by default, you gotta declare your variables", but that might not be popular for "dash off a quick script" usage; maybe make it configurable based on the load context or something?]
But this:
> The odd and slightly under-documented stack that you have to use when interfacing it with C
... seems almost bizarre. Lua's C interface is probably the most elegant and usable I've ever seen. A stack is the classic abstraction to use for this application, Lua's implementation is well-designed, and Lua's API documentation is both comprehensive and very well written.