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.
- New Things
- Bug Fixes
- Other Stuff
- 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
keyword to filter out iterations you don’t want to keep. Read more here
module no longer sets a global value for
and 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
clause can take multiple values
, comma separated.
- Added destructuring assignment
) 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
, are correctly parsed
- Fixed typo in
- Fix declaration hoisting inside of class body, works the same as
MoonScript has made its way into GitHub
files should start to be recognized in the near future.
I’ve started a couple interesting projects for MoonScript as a web programming language.
— A MoonScript friendly web framework. Includes application routing, a HTML construction MoonScript DSL, and a basic ORM.
— 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:
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.