Module 0 README
How Chinese Works
Module 0: README.md
How Chinese Works — A Technical Overview for Engineers
You've been lied to. Somewhere along the way, someone told you Chinese is "the hardest language in the world." Let me compile that claim and show you every error it throws.
1. Why Chinese Is Easier Than You Think
English is a mess. It's the language equivalent of a legacy codebase with 1,500 years of
undocumented patches. Irregular verbs? That's tech debt from Old Norse merging with Anglo-Saxon.
Gendered pronouns? A half-deleted feature nobody finished removing. Spelling rules?
i before e except after c — unless you're a weird foreign neighbor seizing eight beige sleighs.
Chinese doesn't do any of that. Look at this:
| What English Does | English | Chinese |
|---|---|---|
| Conjugation (person) | I go, he goes | 我去, 他去 |
| Conjugation (tense) | I went, I will go | 我去, 我去 |
| Plurals | one child, two children | 一个孩子, 两个孩子 |
| Articles | a book, the book | 书 |
| Grammatical gender | he / she / it | 他 / 她 / 它 (all pronounced ) |
| Verb forms | go / goes / went / gone / going | 去 |
Time? You just say the time word: 昨天 ( — yesterday), 明天 ( — tomorrow). The verb doesn't change. It's a function parameter, not a mutation on the verb itself. No past participles. No subjunctive. No "if I were" vs "if I was." Just... data in, sentence out.
2. The Compilation Model
Chinese characters are not random drawings. They're composed — built from smaller components the way complex objects are built from simpler ones. Here's the pipeline:
// The Chinese Compilation Pipeline Strokes → Radicals → Characters → Words → Sentences (raw keystrokes) (base classes) (objects) (expressions) (statements)
Let's trace a real example through the pipeline:
| Stage | Programming Analogy | Chinese Example |
|---|---|---|
| Radicals | Interfaces / base classes | 日 (sun) 月 (moon) |
| Character composition | Object composition | 日 + 月 = 明 (bright) |
| Word formation | Expression | 明天 = bright + day = "tomorrow" |
| Sentence | Statement | 明天我去 = "Tomorrow I go" |
// Character composition is like composing pure functions const sun = "日"; // radical: sun const moon = "月"; // radical: moon compose(sun, moon) // → 明 (bright) — sun AND moon? That's bright. compose(sun, sun) // → 昌 (prosperous) — double sun energy compose(moon, moon) // → 朋 (friend) — two moons side by side
氵.
3. Tones — A 4-Value Enum
Yes, Chinese has tones. No, they won't kill you. Think of them as a small enum that disambiguates otherwise-identical function names:
enum Tone {
FLAT = 1, // ˉ High and level, like a flatline
RISING = 2, // ˊ Goes up, like asking "really?"
DIPPING = 3, // ˇ Dips down then up, like "well..."
FALLING = 4, // ˋ Drops hard, like a firm "No."
NEUTRAL = 0 // · Unstressed, short, like a schwa
}
Here's the classic example — same sound "ma", four different meanings:
| Tone | Pinyin | Character | Meaning | Pitch Contour |
|---|---|---|---|---|
| 1st (FLAT) | 妈 | mother | ‾‾‾‾‾‾‾ | |
| 2nd (RISING) | 麻 | hemp / numb | ╱‾ | |
| 3rd (DIPPING) | 马 | horse | ‾╲ ╱‾ | |
| 4th (FALLING) | 骂 | to scold | ‾╲ |
// Tones disambiguate overloaded syllables
function ma(tone: Tone): string {
switch(tone) {
case Tone.FLAT: return "妈 (mother)";
case Tone.RISING: return "麻 (hemp)";
case Tone.DIPPING: return "马 (horse)";
case Tone.FALLING: return "骂 (to scold)";
case Tone.NEUTRAL: return "吗 (question particle)";
}
}
// Don't mix up your tones. Calling your mother a horse at dinner
// is an unhandled exception nobody wants to debug.
read
in English could be present or past tense but you always know from context.
If you get a tone slightly wrong in a full sentence, people will still understand you.
Tones matter, but they're not a showstopper — they're more like type hints than strict typing.
4. Pinyin — Source Code Annotations
Chinese characters are the compiled output. Pinyin is the source code annotation — the human-readable pronunciation guide written in the Latin alphabet.
// Characters = compiled binary (what native speakers read) 你好世界 // Pinyin = source code / documentation (what learners read) nǐ hǎo shì jiè // "Hello World" // English = the comments "you" + "good" + "world" + "boundary"
Every Chinese character has a pinyin spelling. Pinyin uses the Latin alphabet plus tone marks: (the marks match the tone contours — flat, rising, dipping, falling). Modern Chinese people type using pinyin on their phones and keyboards, so it's not just a learner's tool. It's literally how Chinese is input into computers.
5. Word Order Is Everything
Since Chinese has no conjugation, no case endings, no gender markers — basically no inflection at all — there's exactly one mechanism that carries all the grammatical load: word order.
This is great news for programmers. You already think in positional arguments.
// Chinese sentence = function call with strict positional args
// Word order IS the grammar. Move something, break everything.
sentence("我", "去", "学校"); // 我去学校 — I go to school ✓
sentence("学校", "去", "我"); // 学校去我 — School goes to me ✗ (runtime error)
// English can shuffle: "To school I go" (weird but valid)
// Chinese cannot. The slots are fixed. Period.
The basic word order is Subject-Verb-Object, same as English. But the extended order is where it gets interesting — we'll cover that in Module 1. The short version: time and place go before the verb, not after. 我昨天去学校 = I yesterday went-to school (not "I went to school yesterday").
sentence(subject, time?, place?, manner?, verb, object?).
If it feels like filling in function parameters in the right order, that's because it basically is.
6. The 4 Sentence Types
Every Chinese sentence is one of four types. Think of these as HTTP methods for speech:
| Sentence Type | HTTP Analogy | How It Works in Chinese | Example |
|---|---|---|---|
| Statement | GET — just delivering info |
Default SVO word order | 我是学生。 I am a student. |
| Question | GET ?query= — requesting info |
Three ways (see below) | 你是学生吗? Are you a student? |
| Command | POST — requesting action |
Drop the subject, just verb+object | 坐下! Sit down! |
| Exclamation | 200 OK! — strong response |
Add 啊 / 太...了 | 太好了! So great! |
The three ways to form questions deserve special attention (we'll go deep in Module 1):
// Method 1: Append 吗 (ma) particle — like adding @question decorator statement = "你是学生" // You are a student question = "你是学生吗?" // Are you a student? (just append 吗) // Method 2: Question word in-situ — the variable stays in its slot "你是什么?" // You are WHAT? (什么 sits where the answer goes) "谁是学生?" // WHO is a student? (谁 sits in the subject slot) // Method 3: V-not-V pattern — like a boolean parameter "你是不是学生?" // You [are-not-are] a student? = Are you a student?
README Summary: What You're Working With
/** * @language Chinese (Mandarin) * @version Simplified (used in mainland China, Singapore) * * @features * - No conjugation → verbs never change form * - No tenses → time expressed via adverbs, not verb mutation * - No plurals → quantity expressed via numbers, not word mutation * - No articles → no "a" or "the" — you'll never miss them * - No grammatical gender → he/she/it all sound the same * - Strict word order → positional arguments carry all grammar * - Compositional → characters are built from reusable components * - 4 tones → small enum, manageable with practice * * @complexity O(vocabulary) — grammar is constant-time, * the learning curve is almost entirely vocab acquisition * * @note This is genuinely one of the most logical, regular languages * on Earth. The hard part is characters and tones, not grammar. * And you're an engineer. Pattern recognition is what you DO. */
Ready to start executing? Module 1: The Runtime covers how Chinese sentences actually run — word order, slot positions, negation, and questions. Let's compile some sentences.