Settings

Theme

MoonScript v0.2.0 Released

leafo.net

35 points by Arkeus 14 years ago · 12 comments

Reader

MartinMond 14 years ago

Together with https://github.com/luvit/luvit this can be pretty awesome.

  • keyle 14 years ago

    Very interesting indeed. Any alternatives to Coffeescript?

    • MartinMond 14 years ago

      What do you mean? MoonScript is to Lua what CoffeeScript is to JavaScript.

      • keyle 14 years ago

        Sorry, I meant exactly that - do we know of any other languages than "Coffeescript"ish languages that convert to either javascript or lua? - thanks

        • roestava 14 years ago

          Yes, Dart. It's a Google sponsored language that's shaping up great. http://www.dartlang.org/

          Dart goes beyond what CoffeeScript offers. For instance, Dart can use a lot of library code and try to produce a final script that ships only the methods your program uses.

          Dart has many parts to it. There's a Dart Editor that uses Eclipse as a foundation but actually strives to be a lightweight editor. The Dart compiler shipped with the Dart Editor is the more stable one in my experience, but it tends to produce scary JavaScript at the moment. If you tell it to produce "optimized" JavaScript it will try harder to make the final script smaller, but it isn't too pretty. The Editor will get some good debugging features soon.

          Then there's a new compiler that's still being developed for Dart called Frog. It actually produces much more decent JavaScript code.

          And there's a VM for Dart that's useful for testing and developing smaller scripts that can run without the browser. There's a promise that the VM will be integrated with a branch of the WebKit browser component which should help with making use of the VM in a browser environment. Maybe next week we'll get a first version of it. (I speak as a user.)

          As they say, the sky is the limit. I'm excited and have written thousands of Dart code, much of which has been converting my JavaScript library code to Dart.

          • sigzero 14 years ago

            You might like it but almost every write up I have read has not been nice to Dart.

            • roestava 14 years ago

              I do like it. It compares well with my Ruby code which is saying a lot. :-)

              A lot of years ago when I started with Ruby, one of the first things I cared about was how easy it was to write OO in Ruby. I like it perhaps even better in Dart. Ruby has features that Dart will never have, not to mention that once Dart is released it may stop evolving, whereas Ruby that has evolved so much will continue to do so.

          • keyle 14 years ago

            I'm sorry, do you work for google? You sound like you're selling it to us.

        • dangoor 14 years ago
LeafStorm 14 years ago

While some of the features MoonScript provides are very interesting, I'm not sure it's really needed as much for Lua as CoffeeScript is for JavaScript - Lua is a rather nice language on its own.

  • leafo 14 years ago

    Lua is actually pretty verbose. The MoonScript codebase is about 1700 lines of MoonScript and it compiles up to 3k lines of Lua (and that's without whitespace and comments)

    Things like classes, comprehensions, and other syntactic sugar really do help with writing concise and easy to read programs.

evanlong 14 years ago

THE FOUNDER OF APEDICK.COM IS AT IT AGAIN

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection