Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not knowing much about MoonScript and only knowing a tiny bit of Lua, does anyone have a recommendation on which is "better" if you are starting from where I'm at with these languages?

MoonScript looks class based; I avoid classes like the plague in JavaScript because of "this" but maybe that is the wrong starting assessment?



MoonScript supports classes via keyword, while in Lua you have to implement them yourself. That's about it. You can ignore them, even more so than in JS.

MoonScript is dead anyway. Check out yuescript instead: https://github.com/pigpigyyy/Yuescript


lua-classy (https://github.com/siffiejoe/lua-classy) works like gem and is fast!


It's 10x larger than it needs to be, and seems to do a lot of unnecessary stuff. I would call this one hopelessly bloated and overengineered and recommend something like https://github.com/Yonaba/30log instead.


Start with Lua. Moonscript produces Lua so you will have to deal with Lua if you’re ever to debug a Moonscript program. The opposite isn’t true


I would strongly recommend just learning vanilla lua. The beauty of lua is that it is lightweight and runs anywhere so it is worth learning on its own terms. Wrapper languages come and go, but lua 5.1 is still highly usable even though it hasn't changed its feature set in 15 years (and never will).


I wouldn't run from classes just because JS historically has, though coming from JS I'd lean towards lua for a more familiar function calling syntax.


Fennel is a neat Lisp-flavored Lua language that I've been using for around 2 years now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: