Hacker News new | ask | show | jobs
by jmclnx 741 days ago
Lua is one language I have been wanting to use, especially since it has hooks into the NetBSD kernel.

And

>And what about the lack of classes in Lua?

to me is a big plus :)

2 comments

The problem with "lack of classes" is that every non-trivial program makes its own implementation of something-like-classes, but built on top of metatables.

So before you can start hacking on anything in Lua, you have to first understand the class system, which may or may not be documented.

And I avoid such code. Not everything has to be OO.
You can use functional versions which compile to Lua code, like Fennel https://fennel-lang.org/
I have used it production (embeded/mobile), and I liked a lot. Their associated tables are just awesome.

The problem with Lua is that object oriented programing is not necessary a first class citizen (you have to create it from scratch with object prototypes) and that Python occupies the same space and has sucked the oxygen out of it.

Think of Lua as a much leaner/simpler Python, and better for embeded situations.

Lua can also be massively faster than Python (LuaJIT).