Re:A Look at the Design of Lua
by antirez on Tuesday October 30, 2018 @07:40AM
(#18335566)
I've problems at recognizing any significant part of Lua that is better designed than Ruby, from the POV of the language itself, pretending implementations do not exist. But this is just a personal POV so we could argue forever. I also bet that a very good subset of Ruby could be implemented with a similar-sized code base than Lua (but not at the same speed probably).
[ Parent
| on HN ]
Re:A Look at the Design of Lua
by ModernMech on Tuesday October 30, 2018 @09:14AM
(#18336129)
> a very good subset of Ruby could be implemented with a similar-sized code base than Lua
That would have to be quite the subset. The Ruby parser alone is almost 12kLOC. I've implemented entire languages in 1/10th that.
mruby (http://mruby.org/, https://github.com/mruby/mruby) is the official attempt to do just that. Depending on what you count it's around 30-60kLOC. It has a standalone bytecode compiler, so the parser (which is "only" 6kLOC) doesn't have to be a part of the runtime.