Pluto is a unique dialect of Lua with a focus on general-purpose programming

原始链接: https://github.com/PlutoLang/Pluto

Pluto is a Lua dialect designed for general-purpose programming, prioritizing accelerated development and enhanced usability. It expands Lua's standard library and introduces new syntax like `switch` statements and ternary expressions. While largely Lua 5.4 compatible at both source and bytecode levels, new keywords may create conflicts, resolvable via "Compatibility Mode." A small subset of Pluto features lack Lua 5.4 bytecode compatibility, clearly documented for developers to avoid when necessary. Pluto actively maintains compatibility with the Lua ecosystem, with successful integration into large communities and plans to update to Lua 5.5. It offers comprehensive, open-source documentation and tools including a language server and syntax highlighting. Ready to try it? Explore the interactive playground or download pre-built binaries.

Pluto is a Lua dialect aiming for general-purpose programming by adding features like classes, named parameters, string interpolation, and optional static typing. It modifies the Lua VM to support features like multi-level `break` statements. While some see these additions as helpful syntactic sugar, others worry about the cognitive overhead of having two similar languages within the Lua ecosystem. Concerns are raised about unnecessary complexity, especially with overlapping syntaxes that might lead to less readable code. Specifically, multi-level break is called out as being a poor design, and that using labels might be a better solution. Despite differing opinions on design choices, Pluto is not intended to replace Lua.
相关文章

原文

Pluto Logo

Pluto is a unique dialect of Lua with a focus on general-purpose programming.

Why should you choose Pluto?

  • Accelerated Development.

    • Greatly enhanced standard library.
    • Several new syntaxes, such as switch statements, compound operators, ternary expressions, etc.
  • Focused On Lua Compatibility.

    • Pluto is largely compatible with Lua 5.4 source code, but there is an imperfection:
      • Pluto implements new keywords, which can cause conflicts with otherwise normal identifiers such as 'switch', or 'class'. The parser tries to identify what is meant but if that doesn't work, you can use Compatibility Mode.
    • Pluto is also compatible with Lua 5.4 bytecode. Pluto can execute Lua bytecode, and most Pluto features generate bytecode compatible with Lua.
      • There's a small subset of Pluto features which do not generate Lua 5.4 bytecode. This is documented alongside those features, so scripters can vouch to avoid using them when bytecode compatibility is desired.
    • Pluto has been dropped into large communities, and did not break any existing scripts (with compatibility mode enabled then gradually disabled).
    • Pluto actively rebases with Lua's main repository. We are not a time-frozen dialect. When Lua 5.5 releases, we intend on updating to that.

A detailed documentation of getting started with, tooling for, and the additions and improvements of Pluto can be found on our website, which is open-source as well.

Getting Started

You can use Pluto right in your browser in the interactive playground, or find pre-built binaries on our releases page. Read more...

Tooling

联系我们 contact @ memedata.com