Today marks MoonScript version 0.2.3, the CoffeeScript inspired language that compiles to Lua. It’s been about 3 months since last release. I've got a couple new features, fixes, Lua 5.2 support and a backwards incompatible change.
- For loops when used as expressions will no longer discard nil values when
accumulating into an array table. This is a backwards incompatible
change. Instead you should use the
continuekeyword to filter out iterations you don’t want to keep. Read more here.
moonscriptmodule no longer sets a global value for
moonscriptand instead returns it. You should update your code:
moonscript = require "moonscript"
- Lua 5.2 Support. The compiler can now run in either Lua 5.2 and 5.1
- A switch
whenclause can take multiple values, comma separated.
- Added destructuring assignment.
local ^) for hoisting variable declarations in the current scope
- List comprehensions and line decorators now support numeric loop syntax
- Numbers that start with a dot, like
.03, are correctly parsed
- Fixed typo in
- Fix declaration hoisting inside of class body, works the same as
MoonScript has made its way into
.moon files should
start to be recognized in the near future.
I've started a couple interesting projects for MoonScript as a web programming language.
- Lapis — A MoonScript friendly web framework. Includes application routing, a HTML construction MoonScript DSL, and a basic ORM.
cloud_storage— A MoonScript/Lua module for interacting with Google Cloud Storage.
Using the following I've created a community powered Lua rock hosting website called MoonRocks:
Ludum Dare happened again, two games were created in MoonScript:
Additionally, Michael F has created a game engine, BoxEngine, which natively supports MoonScript.
Thanks to everyone who provided feedback for this release. See you next time.