Skip to content

A Blunt Critique of the “YaoXiang Design Manifesto” ​

Version: v2.0.0 (after all, an “official release” draft is still a release)
Status: Cerebral climax
Author: Chen Xu + an “community” that has yet to form
Date: 2026-05-31 (from the future, but the compiler is still stuck in yesterday)


“The Dao gives birth to one, one gives birth to two, two gives birth to three, and three gives birth to all things.”
— Tao Te Ching

Types are like the Dao; all things arise from them.
(Programmers are like ants, all brought forth by this volume.)


I. Why Create YaoXiang? — Because the World Obviously Needs a 514th Language ​

1.1 Filling the Language Gap ​

Throughout the history of programming languages, we have witnessed countless languages being born, becoming popular, and then being thrown into the dustbin of history. But we are different—we keenly discovered a staggering gap: there is no language that simultaneously makes Rust enthusiasts think it is too simple, makes Python users think it is too complicated, and makes AI models feel “comfortable” while generating code.

RequirementProblem with existing solutionsOur solution (projected)
Type safetyRust is too strict, TypeScript is too looseWe will create a type system in a quantum superposition of strictness and looseness
Natural syntaxEveryone else’s syntax feels unnaturalOur syntax will be so natural that you forget you are programming—or perhaps because you cannot understand it
AI-friendlyAI-generated code frequently contains errorsWe will design the syntax for AI; humans may use it along the way

1.2 Solving Real-World Problems ​

Problem One: Fragmentation of the Type System
We propose “everything is a type,” which resolves the philosophically troubling question of why some things are not types. Now even your indentation level can be a type (IndentationLevel<4>).

Problem Two: Memory Safety Versus Performance
We initially adopted Rust’s ownership model, but found that the “borrow checker” was too difficult to implement. Then inspiration struck: rename &T and &mut T from “references” to “tokens,” and declare them to be “zero-sized compile-time permission proofs.” Now there is no need for a borrow checker—only “flow-sensitive liveness analysis.” Sounds completely different, doesn’t it? If a program has a data race, it must be a problem with the token branding mechanism.

Problem Three: The Cognitive Burden of Asynchronous Programming
We reinvented the wheel and named it the “spawn model.” All you need is one spawn, and the compiler automatically handles every asynchronous detail. If it cannot, your code was not “spawned” properly.

Problem Four: The Bottleneck in AI-Assisted Programming
We thoughtfully designed strict indentation and explicit boundaries for AI, ensuring that GPT-7 will not dissociate while generating code. Whether human programmers can understand it is, of course, secondary.

1.3 The Language’s Philosophical Foundations ​

The name YaoXiang comes from the Book of Changes, ensuring that it comes with a built-in mysticism buff in technical discussions. When your code fails to compile, you can say, “The yin and yang are out of balance; let me cast a hexagram and see.”


II. Core Philosophy and Principles — Unquestionable Dogma ​

2.1 Principle One: Everything Is a Type ​

The non-negotiable reason: This lets us explain everything through type theory, including why project schedules are always delayed.

2.2 Principle Two: Strict Structure ​

The non-negotiable reason: Four-space indentation is a universal truth. Anyone who uses tabs should be exiled to Mars.

2.3 Principle Three: Zero-Cost Abstractions ​

The non-negotiable reason: Although our abstraction layer has seven levels, because it is “zero-cost,” performance should be roughly comparable to hand-written assembly... theoretically.

2.4 Principle Four: Immutability by Default ​

The non-negotiable reason: Mutability is the root of all evil. If you need to modify a variable, your design is wrong.

2.5 Principle Five: Types Are Data ​

The non-negotiable reason: This lets us inspect types at runtime and then discover... the compiler already checked them at compile time.


III. Key Innovations and Features — Reinventing Things That Were Already Invented ​

3.1 Innovation One: Unified Type Syntax ​

We abolished the confusing concepts of enum, struct, union, trait, and impl, and then abolished the type keyword itself. Now everything uses name: Type = value. Remember, Type is not a keyword—it is a reserved word. Don’t ask where the distinction lies.

3.2 Innovation Two: Constructors Are Types ​

We eliminated the divide between “types” and “values,” then created a new divide: “Is this a type constructor or a value constructor? Oh wait, they use the same syntax now, so they’re even harder to distinguish.”

3.3 Innovation Three: Curried Method Binding ​

We implemented method calls through currying. Now you can use Type.method = function[0] instead of a self parameter. Obviously more intuitive. [0] means “treat argument 0 as self.” If you forget to write [0], the compiler will tell you, “This is not a method; it is an ordinary function.” Simple!

3.4 Innovation Four: Ownership Model (RFC-009 v9) ​

Five concepts, one gradient: &T, &mut T, Move, ref, clone(), unsafe. Wait, that is six. Never mind—&T and &mut T are “tokens,” not “references.” What is the difference? References are a C++ concept; tokens are zero-sized, type-level permission proofs established at compile time. When your code fails to compile, you can say, “Type attribute Dup/Linear inference failed,” and nobody will dare contradict you.

The token system also comes with these advanced features:

  • freeze: “Freezes” &mut T into &T. It is like putting fresh produce in the refrigerator—you cannot cook it before thawing it. The compiler tracks the frozen state using “flow-sensitive liveness analysis,” which sounds like an ICU monitor.
  • Branding mechanism: Every token is assigned a unique integer at compile time (brand #N) to prevent forgery. “Sorry, sir, the brand #42 of your &Point token does not match brand #43 in the owner capsule.”
  • Cannot cross tasks: Tokens are “compile-time permission proofs” and cannot cross threads. If you need to share them across tasks, use ref. Why? Because the compiler said no. More accurately, tokens disappear after compilation—zero-sized types, zero runtime overhead, and zero cross-task capability.

In summary: Rust uses 200 pages of The Book to explain the borrow checker. YaoXiang explains everything with two sentences: “&T is copyable; &mut T is not.” Simplicity is beauty.

3.5 Innovation Five: The Spawn Model—The Crummiest Part of the Entire Language ​

“All things spawn, and I observe their recurrence.” — I Ching, Fu Hexagram

The spawn model’s core selling point: synchronous syntax, asynchronous essence. Translated into human terms: your code looks sequential, but the runtime automatically executes it in parallel. When does it run in parallel? How does it run in parallel? The compiler decides. This is not a concurrency model; it is a trust game.

Here is what we stuffed into the language to create this magic:

The spawn keyword: Marks a function as asynchronous. Note that it is not async; it is spawn. async is too mainstream. spawn already means “start a task” in Rust, but never mind; we redefine it.

The @block annotation: Marks a spawn function that should “execute synchronously.” Wait—if spawn is asynchronous and @block makes it synchronous, why not simply omit spawn? “Because sometimes you need a spawn function to run synchronously in certain contexts.” Therefore, a function marked with spawn may be asynchronous or synchronous, depending on the caller’s mood. This is not a type system; it is split personality.

The @eager annotation: Marks an expression that requires “eager evaluation.” This is because the spawn model uses lazy evaluation by default—although lazy evaluation has not actually been implemented yet. So what does @eager currently do? It is an IOU: “Someday, when lazy evaluation is implemented, this annotation will ensure that the expression is not evaluated lazily.”

Summary of the three concurrency-model annotations:

spawn  = 这个函数会异步(除非被 @block 了)
@block = 这个 spawn 函数这会是同步的(覆盖 spawn)
@eager = 这个表达式将来不会被惰性求值(你先别管将来)

If you find this confusing, congratulations—you understand it. When your code crashes in parallel, you can quote the Book of Changes and appear remarkably profound.

3.6 Innovation Six: Value-Dependent Types (RFC-011) ​

You can now prove at compile time that an array’s length is prime, that matrix dimensions match, or that the result of factorial(5) can be used in a type signature. Although this has little to do with writing business logic, “types are propositions, programs are proofs”—pretty cool, isn’t it?

3.7 Innovation Seven: Minimal Keyword Design ​

Only 18 keywords! Seven fewer than Go! Although each keyword is three times as complex as a Go keyword, we win on raw count. Note that type is not a keyword—it was removed in RFC-010. You now use name: Type = value, where Type is a reserved word. What is the difference between a keyword and a reserved word? Don’t ask; the answer lies in the compiler’s internal universe hierarchy of Type0/Type1/Type2.

3.8 Innovation Eight: Curry-Howard Correspondence—The Universal Explanation ​

Whenever someone questions a design decision, the standard response is: “This follows from the Curry-Howard correspondence.” Don’t understand it? No problem; nobody in the community really does. The basic idea is “types are propositions, programs are proofs,” so your code is not merely a program—it is a mathematical paper. A compilation error is a proof by contradiction.

The philosophy’s greatest achievement is the Easter egg in RFC-010: Type: Type = Type. Try compiling this line and the compiler will not crash. Instead, it will print a Zen-like message along the lines of, “The Dao that can be spoken is not the eternal Dao; a type that can be typed is not an eternal type.” This is YaoXiang’s tribute to Girard’s paradox and the only feature the compiler deliberately refuses to implement. We call it the “language boundary”: when you reach it, the compiler falls silent, and philosophy dwells.


IV. Preliminary Syntax Preview — Code Samples That “Seem to Work” ​

yaoxiang
# === Hello World (can be run in your head) ===
main: () -> Void = {
    print("Hello, 未来的贡献者!")
}

# === Ownership model: five concepts (actually six) ===
Point: Type = { x: Float, y: Float }

p1 = Point(1.0, 2.0)
p2 = p1              # Move. Rest in peace, p1.
p2.print()           # The compiler creates an &Point token. Token brand #4201, please accept.
p2.shift(1.0, 1.0)  # The compiler creates an &mut Point token. Exclusive! Other tokens, stand back!
shared = ref p2      # ref = shared. The compiler automatically picks Rc. Or Arc. You don't need to know.
backup = p2.clone()  # Deep copy. Why not ref? Because ref is not a copy; it is sharing. Get it?

# === Unified syntax: name: type = value ===
# Can you tell which of the following is a type, which is a function, and which is a variable?
# Answer: You can't. That is the beauty of "unification".
identity: (T: Type) -> ((x: T) -> T) = x
List: (T: Type) -> Type = { data: Array(T), length: Int }

# === Value-dependent types: put a factorial in the type signature ===
factorial: (n: Int) -> Int = {
    # The compiler automatically analyzes parameter decrease; no comments needed
    if n <= 1 { return 1 }
    return n * factorial(n - 1)
}
arr: Array(Int, factorial(5)) = Array(Int, 120)()  # Array(Int, 120) type, computed at compile time

# === Spawn model: spawn + @block + @eager = three-in-one chaos ===
fetch_data: (url: String) -> JSON spawn = {
    return HTTP.get(url).json()
}

@block  # This line makes the spawn function above synchronous at this call site
main: () -> Void = {
    data = fetch_data("https://api.example.com")  # Synchronous? Asynchronous? Depends on the mood.
}

# @eager: mark this as "do not evaluate lazily once lazy evaluation is implemented in the future"
result: Int eager = heavy_computation()  # Currently the same as not writing it

# Summary:
# spawn = asynchronous (unless @block)
# @block = makes spawn synchronous
# @eager = someday will not do something (nothing happens now)
# All three concepts together = if else

The code above runs perfectly in the documentation. Actual compilation results may differ. No, they definitely will.


V. Roadmap and Open Questions — The Wish List ​

5.0 The RFC Dependency Triangle ​

Before examining the roadmap, let us appreciate the most ingenious architectural design in YaoXiang—the RFC love triangle:

RFC-009 (所有权)  →  依赖 RFC-010 (统一语法)  →  依赖 RFC-011 (泛型)
    ↑                                                         │
    └──────────────────── 依赖 ────────────────────────────────┘

009 needs the syntax from 010, 010 needs the generics from 011, and 011 needs the type system from 009. All three RFCs presuppose one another. Which should we implement first? “We recommend implementing them simultaneously.”—RFC-010, line 141.

This is the Curry-Howard correspondence in practical engineering: every RFC is a proposition, and their dependencies form a logical circle. Breaking the circle requires introducing an external axiom—namely, “We will hard-code the type checker first and worry about it later.”

5.1 Settled Design Decisions ​

No further changes will be accepted, unless we change our minds.

5.2 Design Issues Awaiting Discussion ​

These include trivial details such as “literal syntax,” “generic inference,” and “pattern matching.” The core philosophy is already perfect; these small matters can take their time.

5.3 Implementation Roadmap ​

v0.1: Rust 解释器 ✅
v0.5: 字节码编译器 🔄 (进行中,已经进行了18个月)
v1.0: 生产就绪   ⏳ (等我们找到第10个贡献者)
v2.0: 自举       ⏳ (当我们在 v1.0 中解决了时间旅行问题后)

5.4 Current Implementation Status ​

  • Lexer: ✅ 100% (can recognize the word spawn)
  • Parser: ✅ 100% (can parse whatever ought to come after spawn)
  • Type checker: ✅ 95% (can determine that 42 has type Int, but the universe level of Type is still under debate)
  • Ownership token system: ✅ 100% (the design document is complete. Implementation? That is the next step.)
  • RFC documents: ✅ 14 accepted (800 lines each on average. Code? What code?)
  • Actually runnable code: 🔴 0%

VI. How to Contribute — Bring Your Time, Enthusiasm, and Lowered Expectations ​

The authors field in Cargo.toml: ["YaoXiang Team", "ChenXu2333"]. Team and ChenXu2333 stand side by side. Research confirms that Team currently consists of one person. Yet the plural form “Team” leaves ample room for imagination.

6.1 Design Discussions ​

Ideal audience: People who enjoy debating in theory whether “a monoid is a monoid in the category of endofunctors.”

6.2 Compiler Implementation ​

Ideal audience: People with spare brain cells who do not mind having them used to implement the seventh memory-management model.

The contributions needed most right now:

  • Token conflict detection: Implement “flow-sensitive liveness analysis.” Don’t worry; although the name is long, the principle is simple—track each token’s state within a function body: live, frozen, or moved. It is like tracking three children in a playground, except the children might recurse infinitely.
  • Cross-task cycle detection lint: Detect cross-task cyclic references involving ref. Warn by default, with an option to deny. We need someone to decide how stern the warning should be: “Warning: cross-task cycle detected” or “Warning: your code forms a cross-task cycle; it will not leak, but you should feel ashamed”?

6.3 Toolchain Development ​

Tools that need to be developed: An LSP server, debugger, formatter, package manager... everything. Especially the LSP—when users hover over Type: Type = Type, a tooltip reading “the ineffable” should appear.

6.4 Standard Library Construction ​

Everything from std.io to std.gui should be available. What exists today: std.placeholder. The next item on the roadmap: std.placeholder_v2.

6.5 Documentation Translation ​

We need to translate 14 RFCs into English, averaging 800 lines each, for a total of roughly 11,200 lines. Given that the RFCs are filled with concepts such as “spawn,” “YaoXiang,” and “all things spawn, and I observe their recurrence,” this is approximately equivalent to translating half of the Tao Te Ching. Apply now.

6.7 Contribution Guidelines ​

Commit message format: Must be a poem. Fourteen-line sonnets are preferred. Haikus are also acceptable:

所有权令牌
编译之后消失不见
零成本抽象

Appendix C: Frequently Asked Questions ​

Q: What advantages does YaoXiang have over Rust?
A: Less syntactic sugar! Fewer keywords! Fewer practical features! But greater philosophical depth. Besides, we have a “borrowing-token system”—sounds more advanced than a “borrow checker,” doesn’t it?

Q: What kind of development is YaoXiang suitable for?
A: Developing the YaoXiang compiler. Writing design manifestos and RFCs. All other uses remain under investigation.

Q: Why use four-space indentation?
A: Two spaces is too cramped, eight spaces is too sparse, and four spaces embodies the Doctrine of the Mean while conforming to the spirit of the Book of Changes.

Q: Is Type a keyword?
A: No. It is a “reserved word.” The difference between a keyword and a reserved word is that keywords appear in the language specification’s keyword list, whereas reserved words appear in the list headed “Warning: the following are not keywords.” Simple and clear.

Q: Why are there 14 accepted RFCs when the version number is still 0.7.0?
A: Because we are playing the long game. Design first, implementation later. Very much later.

Q: Is ref actually Rc or Arc?
A: The compiler chooses automatically. You need not worry. More accurately, this is the only situation in which the compiler understands users better than they do, so we are exercising restraint by delegating the decision.

Q: When will the “spawn model” actually work?
A: When you read this sentence, the answer is still “design phase, not implemented.” However, the spawn keyword can already be parsed correctly. Isn’t that exciting?

Q: When will version 1.0 be released?
A: When the “community” grows from one person to two.

Q: How do I contact the core team?
A: Leave a post on GitHub Discussions. Expected response time: 1–3 business months.


VII. Even More Lies ​

“Multilingual support”: docs/src/{en,ja,ru,zh} provides all four languages. The compiler is at v0.7.0, and the number of lines of actually runnable code is approximately zero, but Japanese and Russian developers can already read “spawn models” and “value-dependent types” in their native languages. This is classic “documentation-driven development”—first make sure the whole world understands your design, then pretend somebody needs it. By the time the compiler can run Hello World, the documentation will already have been translated into Klingon.

Toolchain Russian dolls: Python’s pre-commit checks Rust’s code style (cargo fmt + clippy), while the Rust compiler compiles the YaoXiang source code. Three language layers are stacked atop one another, each depending on the one below. Once YaoXiang becomes self-hosting, the nesting will become: Python checks Rust, Rust compiles YaoXiang, and YaoXiang compiles YaoXiang. At that point, if a single upstream dependency breaks, the entire toolchain becomes performance art. It does not matter, though—the word “self-hosting” alone is worth two RFCs.

YaoXiang-book.md: A systematic book about the YaoXiang language. Writing a book about a programming language that has not yet been implemented is equivalent to publishing a travel guide to a city that does not exist. “Chapter Three: Generics—all code in this chapter cannot compile, but the syntax is correct. Please imagine the result.” The book’s most honest sentence is on its first page: “Project status: experimental validation stage.”

“No GC”: The official position is: “YaoXiang has no GC.” Strictly speaking, it has no tracing GC. However, ref uses reference counting at runtime (Rc/Arc). Does reference counting count as a GC? “No. GC means garbage collection, while reference counting means automatic reference counting. See, even the abbreviations are different. One is GC; the other is ARC. Completely different.” The purpose of this verbal trick is that when someone says, “Isn’t this just reference-counting GC?”, you can solemnly reply, “No, we have no GC—only compiler-managed reference counting.” What is the difference? It is in the slide deck.

Last updated: 2026-05-31 (possibly the final update, but you never know)

Document version: v2.0.0 (our version numbers move quickly, making progress look faster)

License: MIT (after all, MIT is the only license we currently have)


“As YaoXiang changes, all things come into being. As types evolve, programs take shape.”

May YaoXiang’s design journey become a topic you will delight in discussing over tea.
After all, at this stage, it is primarily a topic of conversation.