Hacker News — AI on Front Page · · 2 min read

LuaJIT 3.0 proposed syntax extensions

Mirrored from Hacker News — AI on Front Page for archival readability. Support the source by reading on the original site.

201 pts · 119 comments on Hacker News

Uh oh!

There was an error while loading. Please reload this page.

LuaJIT / LuaJIT Public

LuaJIT 3.0 Syntax Extensions #1475

Copy link
Copy link
Open

Description

@MikePall
Issue body actions

This is an umbrella issue for the LuaJIT 3.0 syntax extensions.

The documentation will be evolved and updated in the first comment below. 1

Please feel free to discuss the choice, design and semantics of syntax extensions in this issue. Improvements and clarification requests for the documentation are welcome, too.

As syntax preferences are largely subjective, please ensure feedback remains constructive. If a specific proposal is declined, please respect the decision and move on. In general, I hope we can keep the discussion focused on functionality and avoid prolonged discussions about cosmetic symbol choices for edge-case operators (aka bike-shedding).

Some of the syntactic choices have already been made by others (C, Lua, JavaScript, …) — and I'm definitely not happy with all of them. But there's value in conformity and compatibility.

The goal is to only add syntax extensions that:

  1. Improve developer quality-of-life.
  2. Are proven. In other languages or Lua dialects.
  3. Do not create syntactic ambiguities.
  4. Do not break backwards compatibility.
  5. Do not make life difficult for tool developers (syntax formatters, LSPs).

Just to make this clear: I have no intention to copy the syntactic complexity of Perl, Ruby, C++ or Rust.

The related issues #63 and #1379 have been closed in favor of this issue.

Footnotes

  1. LuaJIT has accumulated quite a few extensions over the years. Documentation is scattered all over the place. The plan is to write a free-standing, consolidated documentation of the full language. Extensions will be labeled with the version in which they first appeared. The documentation below will be merged there.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Discussion (0)

      Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

      Sign in →

      No comments yet. Sign in and be the first to say something.

      More from Hacker News — AI on Front Page