[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: MoonScript, a language that compiles to Lua
- From: Xavier Wang <weasley.wx@...>
- Date: Thu, 11 Aug 2011 15:07:34 +0800
2011/8/11 leaf corcoran <email@example.com>:
> I've been working on a little language heavily inspired by
> CoffeeScript, which I've called MoonScript. The homepage is located at
> It compiles into Lua, but there are numerous ways to actually run the code.
> The parser is all done in LPeg, and the majority of the compiler
> itself is written in MoonScript. I've also used a few other libraries
> (listed on the site) to build the tools.
> I've also written copious amounts of documentation in the hopes that
> someone will actually use it, http://moonscript.org/reference
> The source is located on GitHub: https://github.com/leafo/moonscript
> I've successfully installed it with LuaRocks on both Linux and OSX. I
> have not tried it on Windows, but I don't see why it wouldn't work.
> I think there's some pretty cool stuff in it. By just requiring
> "moonscript", you can make the require function MoonScript aware and
> have it automatically build and run .moon files as you would with .lua
> files. I've also got line number reversal, so errors that happen in
> the compiled Lua are rewritten to point back to the original
> MoonScript line.
> Anyway, check it out the docs to see the rest of the features. I'd
> appreciate any input (including feature requests). This is the initial
> release so there might be some bumps.
> Thanks, Leaf
Looks interesting, A question:
Why use (function()...end)() method to create a class? if I write
class in a function, every times the function called, the new function
will created, is that OK?