Category:MoonScript: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a ri...")
 
No edit summary
Line 1: Line 1:
[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features.
[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features.


class Thing
<nowiki>class Thing
name: "unknown"
name: "unknown"


Line 10: Line 10:
.name = "MoonScript"
.name = "MoonScript"
\say_name!
\say_name!
</nowiki>

MoonScript can either be compiled into [[Lua]] and run at a later time, or it can be dynamically compiled and run using the moonloader. It’s as simple as require "moonscript" in order to have Lua understand how to load and run any MoonScript file.
MoonScript can either be compiled into [[Lua]] and run at a later time, or it can be dynamically compiled and run using the moonloader. It’s as simple as require "moonscript" in order to have Lua understand how to load and run any MoonScript file.



Revision as of 04:20, 12 March 2013

MoonScript is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features.

class Thing name: "unknown" class Person extends Thing say_name: => print "Hello, I am", @name with Person! .name = "MoonScript" \say_name! MoonScript can either be compiled into Lua and run at a later time, or it can be dynamically compiled and run using the moonloader. It’s as simple as require "moonscript" in order to have Lua understand how to load and run any MoonScript file.

Because it compiles right into Lua code, it is completely compatible with alternative Lua implementations like LuaJIT, and it is also compatible with all existing Lua code and libraries.

The command line tools also let you run MoonScript directly from the command line, like any first-class scripting language.

A comprehensive overview of the language can be found in the reference manual, the rest of this page serves as an overview of the language.

Pages in category "MoonScript"

The following 7 pages are in this category, out of 7 total.