AIToday
AI Coding AssistantsZenn AI/MLPublished: Nov 28, 2026, 22:01 JST

High Schooler Rebuilds Zenith Language With Level Declarations

Send on LINE
High Schooler Rebuilds Zenith Language With Level Declarations

3 Key Points

  1. What happened

    A high school developer rebuilt Zenith, a prefix-notation, parenthesis-free, lazily evaluated, statically typed language, around "level declarations" and says the first interpreter now passes all 16 samples.

  2. Why it matters

    Level declarations let the parser decide expression boundaries mechanically without waiting for type inference, so the language works even where types are unresolved; the trade-off is that the design accepts possible mistakes in exchange for avoiding added syntax.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

Zenith's redesign came after the previous version, which delimited expressions by type information, broke down when types were not yet known—for example, in generic functions where the type parameter does not appear in the level declaration. The new approach moves the decision to a separate level declaration that specifies how many arguments a function takes, independent of types. This lets the parser determine expression boundaries mechanically, even in the presence of unresolved types.

The design also introduces level polymorphism, allowing functions like unless to take a level variable N that the caller specifies. This handles cases where a function returns another function. The author notes that adding let bindings was considered but rejected to avoid extra syntax; instead, lambdas require a directive that can lead to subtle bugs if swapped. The implementation is in C++23 with no external libraries, and the first interpreter passes all 16 sample programs.

FAQ
What problem do level declarations solve?
They specify argument counts separately from types, so the parser can decide where one expression ends and the next begins without waiting for type inference.
Does Zenith have let bindings?
No, Zenith has no let. Instead, lambdas require a [k] directive to distinguish between function and binding.
How large is the implementation?
It is written in C++23 with no external libraries, and the src/ directory is 1,603 lines.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleBaiont Quant's Feng Ji builds AI-agent OS via Cosmic Dawn