# MoonScript

> scripting language that compiles into Lua

**Wikidata**: [Q96804362](https://www.wikidata.org/wiki/Q96804362)  
**Source**: https://4ort.xyz/entity/moonscript

## Summary
MoonScript is a scripting language that compiles into Lua, designed to provide a more concise and readable syntax while maintaining full compatibility with Lua. It was inspired by CoffeeScript and aims to simplify Lua programming by offering a cleaner, more expressive syntax.

## Key Facts
- MoonScript compiles into Lua, ensuring compatibility with existing Lua environments.
- The latest stable version is **0.5.0**, released on **2016-09-26**.
- MoonScript is licensed under the **MIT License**.
- The project is hosted on **GitHub** at [https://github.com/leafo/moonscript](https://github.com/leafo/moonscript).
- The official website is [http://moonscript.org/](http://moonscript.org/).
- MoonScript was inspired by **CoffeeScript**, borrowing its syntax for a more concise Lua alternative.
- MoonScript source code files use the **.moon** extension.
- The project was initially developed in **2013**, with multiple releases in the early versions.

## FAQs
### Q: What is MoonScript used for?
A: MoonScript is used to write Lua code in a more concise and readable syntax. It compiles into standard Lua, making it compatible with existing Lua environments while improving developer productivity.

### Q: How does MoonScript differ from Lua?
A: MoonScript provides a cleaner, more expressive syntax for Lua, inspired by CoffeeScript. It compiles into Lua, so all Lua code remains valid, but MoonScript offers a more modern and concise way to write Lua scripts.

### Q: Who created MoonScript?
A: MoonScript was created by **leafo**, as indicated by the GitHub repository and release history.

### Q: Is MoonScript still actively maintained?
A: As of the latest available data, the most recent release was **v0.5.0** in **2016**, suggesting the project may no longer be actively maintained.

### Q: Can I use MoonScript in existing Lua projects?
A: Yes, MoonScript compiles into Lua, so it can be integrated into any Lua project. However, compatibility depends on the Lua version and environment.

## Why It Matters
MoonScript addresses the need for a more modern and concise syntax for Lua programming. By borrowing inspiration from CoffeeScript, it simplifies Lua scripting while maintaining full compatibility with the Lua ecosystem. This makes it an attractive option for developers who prefer a cleaner syntax without sacrificing performance or interoperability. While it may not have seen widespread adoption, MoonScript demonstrates the value of language design that prioritizes developer experience. Its existence highlights the ongoing evolution of scripting languages and the importance of balancing readability with functionality.

## Notable For
- **Lua Syntax Modernization**: MoonScript introduced a more concise and readable syntax for Lua, inspired by CoffeeScript.
- **Full Lua Compatibility**: All MoonScript code compiles into standard Lua, ensuring seamless integration with existing Lua projects.
- **MIT License**: The open-source MIT License allows for broad adoption and modification.
- **GitHub Hosting**: The project is hosted on GitHub, facilitating community contributions and version control.
- **Early Development**: MoonScript was released in **2013**, contributing to the early exploration of Lua syntax alternatives.

## Body
### Overview
MoonScript is a scripting language that compiles into Lua, designed to provide a more concise and readable syntax while maintaining full compatibility with Lua. It was inspired by CoffeeScript, borrowing its syntax to create a cleaner alternative for Lua programming.

### Development and Releases
MoonScript was developed by **leafo** and released on **2013-07-02** with version **0.2.0**. Subsequent releases included **0.2.2**, **0.2.3**, **0.2.4**, and **0.2.3-2**, all published in **2013**. Later versions, such as **0.4.0** (2015-12-07) and **0.5.0** (2016-09-26), marked the final stable release before potential project stagnation.

### Technical Details
- **Compilation**: MoonScript code compiles into Lua, ensuring compatibility with existing Lua environments.
- **Syntax**: The syntax is heavily inspired by CoffeeScript, offering a more concise and expressive way to write Lua scripts.
- **File Format**: MoonScript source code files use the **.moon** extension.
- **License**: The project is licensed under the **MIT License**, promoting open-source usage and modification.

### Impact and Legacy
MoonScript contributed to the exploration of Lua syntax alternatives, demonstrating the value of modernizing scripting languages while maintaining compatibility. Its existence highlights the ongoing evolution of programming languages and the importance of developer experience in language design. While not widely adopted, MoonScript remains a notable example of a Lua syntax alternative.

## References

1. [Source](http://moonscript.org/#about)
2. [Release 0.2.0. 2013](https://github.com/leafo/moonscript/releases/tag/v0.2.0)
3. [Release 0.2.2. 2013](https://github.com/leafo/moonscript/releases/tag/v0.2.2)
4. [Release 0.2.3. 2013](https://github.com/leafo/moonscript/releases/tag/v0.2.3)
5. [Release 0.2.4. 2013](https://github.com/leafo/moonscript/releases/tag/v0.2.4)
6. [Release 0.2.3-2. 2013](https://github.com/leafo/moonscript/releases/tag/v0.2.3-2)
7. [Release 0.4.0. 2015](https://github.com/leafo/moonscript/releases/tag/v0.4.0)
8. [Release 0.5.0. 2016](https://github.com/leafo/moonscript/releases/tag/v0.5.0)
9. [Release 0.6.0. 2026](https://github.com/leafo/moonscript/releases/tag/v0.6.0)