Skip to content
HN On Hacker News ↗

LuaJIT 3.0 Syntax Extensions

▲ 211 points 135 comments by phreddypharkus 17h ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

1 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 257
PEAK AI % 1% · §1
Analyzed
Jun 25
backend: pangram/v3.3
Segments scanned
1 windows
avg 257 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 257 words · 1 segments analyzed

Human AI-generated
§1 Human · 1%

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:

Improve developer quality-of-life. Are proven. In other languages or Lua dialects. Do not create syntactic ambiguities. Do not break backwards compatibility. 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

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. ↩