How the embeddability of Lua impacted its design
queue.acm.org
queue.acm.org
"Why doesn't Lua have unicode support?"
I mean, it does, but in the same fashion as ANSI C: you need to either pick a convention for multibyte characters or use a third-party library.
And that's not an accident. One part of Lua's embeddability design is that the standard implementation is written in pure ANSI C, and pure ANSI C ... doesn't support unicode.
Should Unicode strings forcibly be UTF-8 in all programs and use char again (thus suffering from the same problem that Python 2 had where bytestrings and Unicode strings weren't sufficiently distinguished, often leading to programmers using the former for text)?
Or should you use short/int arrays instead and have no support from the stdlib at all for handling them (not that the stdlib is particularly good at handling text)?
As far as library support goes, there are a few good Unicode libraries for C, most notably ICU4C.
If you start avoiding all the things that are not fully specified by the standard, your C programs will end up doing very little indeed.
Now, it might be that some environments targeted by Lua have very spartan C runtimes: consoles. Anyone have a pointer to the C runtime docs for Xbox 360 and PS3?
It's a real turnoff for lots of people. In terms of "things new to Lua find unattractive", it's second only to 1-based indexing.
That said, Lua has evolved considerably over the years, specially the embedding API (I belive it has been completely redesigned more then once). Sometimes thery added changes that made the API simpler (for example, globals used to be accessed using special functions, now they use table lookup, as mentioned in the article). Other times, things were originaly limited due to the implementation, but they got "cleaned up" in latter versions (upvalues gave way to proper lexical scope, "tags" became a more general metatable system, etc).
Other then that, I think he gives some lectures on semantics every once on a while. The compilers class is only rarely offered since so few people take it :/