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

Is MoonScript like CoffeeScript for Lua?

CoffeeScript development was one of the most regretful experiences I've had. Delimiters are optional even when invoking functions. A statement like f(g(h(x))) becomes painful to read. Plus, sometimes you want to use a function as a parameter, how do you reason about that? Welcome to the Twilight zone.

Whitespace in CoffeeScript has a meaning. In Python, that is the case too, but it only applies to statement blocks. In CoffeeScript, the situations you will find are just absurd, such as the fact that inconsistent indentation is allowed.

Code is written once, read many times. CoffeeScript emphasizes rapid writing not reading. In that sense, CoffeeScript is to JavaScript what Stenography is to Writing.



Yes, although my experience with Moonscript does not match yours with Coffeescript.

What I personally like a lot is how it makes it easier to write efficient Lua by because (for example) it makes local variables the default.

Also, FWIW the LuaRocks server is written in Moonscript, and that's a pretty important bit of Lua infrastructure I'd say.

[0] https://moonscript.org/reference/

[1] https://github.com/luarocks/luarocks-site


Not to mention itch.io, which is maybe more relevant to the topic of this thread.

Nitpick: The server is openresty (Nginx). The web-framework is Lapis, which is Lua and can be developed on with Lua or Moonscript.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: