3 ms·
To really take advantage of static typing, you would probably need to add support for it to the Lua VM Understandable, but not entirely correct. See StrongTal
by stcredzero 17y ago
To really take advantage of static typing, you would probably need to add support for it to the Lua VM
Understandable, but not entirely correct. See StrongTalk. You can have the static typing be in the parser/compiler frontend only. The programmer can get feedback about type metadata, and can use it in refactoring and ensuring program correctness. The VM has to know bupkus about that stuff. In particular Lua's VM is good enough that in most cases it's not needed for performance reasons.
This makes the typing system somewhat circumventable. But the type system is usually circumventable even in a traditional static typed language. At some point, you have to count on programmers not doing stupid things.
On the other side of the coin, such type systems are optional. Which means that you can have less typing for prototyping and rapid development, and more for mature code going into production and maintenance.
- silentbicycle 17y agoI originally had a few lines about how it would "just" be usable for static analysis, debugging, etc. otherwise, but that would still be worthwhile. I haven't looked into StrongTalk yet though, so thanks. :)
- stcredzero 17y agoWhoops, it's spelled Strongtalk. Arrgh!