Module 1: The Runtime

How Chinese Sentences Execute

You've read the README. You know Chinese has no conjugation, no tenses, no plurals. So how does it actually work? How do you say things?

Simple: word order. Word order is the runtime. Get the words in the right slots and the sentence compiles. Get them wrong and you get a runtime error — confused faces.

1. Default Execution: SVO

The default sentence pattern in Chinese is Subject-Verb-Object — same as English. Good news: your mental model already works for basic sentences.

// Basic execution model
Subject + Verb + Object
   S    +  V   +  O

Let's execute some statements:

Chinese Pinyin Breakdown English
中文 Wǒ xué zhōngwén [S: I] [V: study] [O: Chinese] I study Chinese.
咖啡 Tā hē kāfēi [S: she] [V: drink] [O: coffee] She drinks coffee.
他们 Tāmen chī fàn [S: they] [V: eat] [O: rice/food] They eat.
喜欢音乐 Wǒ xǐhuan yīnyuè [S: I] [V: like] [O: music] I like music.
Tā kàn shū [S: he] [V: read] [O: book] He reads books.
我们英语 Wǒmen shuō yīngyǔ [S: we] [V: speak] [O: English] We speak English.
Notice: (she), (he), and 他们 (they) all use the verb unchanged. No "drinks" vs "drink." No "he drinks." The verb never conjugates. Ever. It's immutable. const verb = "喝"; — and it stays that way.

2. The Full Function Signature: S-T-P-M-V-O

SVO is the simplified version. The full Chinese sentence is a function with strict positional arguments:

function sentence(
    subject: Noun,          // WHO
    time?: TimeExpression,  // WHEN     ← goes BEFORE the verb!
    place?: Location,       // WHERE    ← goes BEFORE the verb!
    manner?: Adverb,        // HOW      ← goes BEFORE the verb!
    verb: Verb,             // ACTION
    object?: Noun           // WHAT
): Statement;

// English puts time/place AFTER the verb:  "I eat at school"
// Chinese puts time/place BEFORE the verb: "I at-school eat"
// The arguments are POSITIONAL. You cannot reorder them.

Let's see the slots in action:

S T (when) P (where) M (how) V O English
明天 学校 I tomorrow go-to school.
每天 在家 电视 She every-day at-home watches TV.
昨天 在公司 很认真地 工作 He yesterday at-office seriously worked.
我们 下午 在咖啡店 咖啡 We afternoon at-cafe drink coffee.
很快地 I quickly run.
The #1 mistake English speakers make: putting time or place after the verb. 我去学校明天 is WRONG. It's like passing arguments out of order to a function with no named parameters. The runtime (your listener) won't know what to do with it. Time BEFORE verb. Place BEFORE verb. Always.
// WRONG — positional args in wrong order
sentence("我", "去", "学校", "明天");   // TypeError: unexpected TimeExpression after Object

// CORRECT — all args in their proper slots
sentence("我", "明天", null, null, "去", "学校");  // ✓ 我明天去学校

3. Topic-Comment = Variable Assignment

Chinese has a second sentence pattern that English barely uses: topic-comment. You state the topic first, then comment on it. It's variable assignment:

// Topic-comment structure
topic = comment;

// "This book, I've read it"
这本书 = 我看过了;
// this_book = I.read.completed();

In topic-comment sentences, the topic doesn't have to be the grammatical subject. It's just the thing you're talking about. It gets "assigned" the comment.

Chinese Pinyin Code Analogy English
这本书我看过了。 Zhè běn shū wǒ kàn guo le. this_book = I.read.completed() This book, I've read (it).
中文我觉得不难。 Zhōngwén wǒ juéde bù nán. chinese = I.think(not_hard) Chinese, I think (it's) not hard.
那个人我不认识。 Nàge rén wǒ bù rènshi. that_person = I.know(false) That person, I don't know (them).
今天天气很好。 Jīntiān tiānqì hěn hǎo. today.weather = very_good Today the weather is great.
Why this matters: Topic-comment is incredibly common in spoken Chinese. When you hear a Chinese sentence that seems to start with the object, it's probably topic-comment. It's not "wrong" word order — it's a different execution pattern. Think of SVO as a regular function call and topic-comment as a method call on the topic: topic.comment().

4. Negation — The ! Operator

Chinese has two negation words. Two. That's it. They go directly before the verb (because modifiers precede the thing they modify — remember, positional args).

Negator Pinyin Used For Programming Analogy
Present, future, habitual, willingness ! — general negation operator
méi Past actions, completed events, "have not" !.completed() — negates past state

See them in action:

Positive 不 (general negation) 没 (past/completion negation)
咖啡。
I drink coffee.
咖啡。
I don't drink coffee. (general/habitual)
咖啡。
I didn't drink coffee. (specific past event)
中国。
She goes to China.
中国。
She won't go to China. (refusal/future)
中国。
She didn't go to China. (past)
老师。
He is a teacher.
老师。
He is not a teacher.
— ( always uses )
// 不 = the general negation operator
!drink(coffee)           // 不喝咖啡 — I don't drink coffee (general)
!want(go)                // 不想去   — I don't want to go

// 没 = negation of completed/past state
!completed(drink(coffee)) // 没喝咖啡 — I haven't drunk coffee (yet)
!have(money)              // 没有钱   — I don't have money

// Rule of thumb:
// 不 = "won't / don't / isn't"  (negating the action itself)
// 没 = "didn't / haven't"       (negating the completion)
Exception to remember: The verb (yǒu — "to have") is always negated with , never . You say 没有 (don't have), never 不有. Think of as an inherently stateful verb — it describes a state of possession, so its negation is always the state-negator .

5. Questions — The Three Decorators

In English, forming a question requires surgery on the sentence: rearrange words, add "do/does/did", invert subject and auxiliary verb. It's like refactoring a function just to change its return type.

Chinese does none of that. The word order stays the same. You just decorate the statement.

Pattern 1: The Particle — @question Decorator

Take any statement. Append (ma). Done. It's now a yes/no question.

// The @question decorator — just append 吗
@question
你是学生。→ 你是学生吗?

// Statement:  你是学生。    (You are a student.)
// Question:   你是学生吗?  (Are you a student?)

// The sentence body is IDENTICAL. Only the decorator changes.
Statement + English
他喜欢咖啡。 他喜欢咖啡 Does he like coffee?
你去中国。 你去中国 Are you going to China?
她有猫。 她有猫 Does she have a cat?

Pattern 2: Question Word In-Situ — Placeholder Variables

This is the one that blows English speakers' minds. In English, question words ("what", "who", "where") jump to the front of the sentence. In Chinese, they stay exactly where the answer would go. They're placeholder variables.

// English reshuffles everything:
// "You eat noodles."  →  "What do you eat?"  (object moved to front, added "do")

// Chinese just swaps the unknown for a question word. IN PLACE.
你吃面。    →  你吃什么?
You eat noodles. → You eat WHAT?

// The question word sits in the answer's slot. Like a template variable:
你吃 {___}?   // what do you eat?
你吃  面。     // you eat noodles.
//    ^^^  same position!
Question Pinyin Answer Slot
你叫什么名字? Nǐ jiào shénme míngzi? 我叫李明 Object (name)
是你的老师? Shéi shì nǐ de lǎoshī? 王老师是我的老师。 Subject (person)
在哪儿工作? Nǐ zài nǎr gōngzuò? 在Google工作。 Place
什么时候来? Nǐ shénme shíhou lái? 明天来。 Time
这个多少钱? Zhège duōshao qián? 这个五块钱。 Amount
This is incredibly elegant. To form a question, you literally just replace the unknown piece with a question word. The rest of the sentence is untouched. No "do-support", no inversion, no auxiliary verbs. It's printf with a %s placeholder: the question word marks where the data goes.

Pattern 3: V-not-V — The isOrIsnt() Pattern

A third way to ask yes/no questions: repeat the verb with in between. It's like explicitly passing a boolean parameter: "is it or isn't it?"

// V-not-V: present both boolean options
是不是   →  is_or_isnt()     // is or is not?
喜欢不喜欢 → like_or_not()   // like or not like?
去不去    →  go_or_not()      // go or not go?

你是不是学生?  // You are-not-are student? = Are you a student?
你去不去?      // You go-not-go?          = Are you going or not?
V-not-V Question Pinyin English
是不是中国人? Nǐ shì bu shì zhōngguó rén? Are you Chinese?
喜欢不喜欢猫? Tā xǐhuan bu xǐhuan māo? Does he like cats (or not)?
你们明天来不来 Nǐmen míngtiān lái bu lái? Are you all coming tomorrow (or not)?

6. Practice — Full Grammar Breakdowns

Time to parse some real sentences. For each one, we'll show the slot positions, the grammar role of each word, and the execution result.

// Sentence 1: Basic SVO
我学中文。
[S:我] [V:学] [O:中文]
// I study Chinese.
// Sentence 2: SVO with time slot
我明天去北京。
[S:我] [T:明天] [V:去] [O:北京]
// I tomorrow go Beijing. → I'm going to Beijing tomorrow.
// Sentence 3: Full S-T-P-V-O
她每天在图书馆看书。
[S:她] [T:每天] [P:在图书馆] [V:看] [O:书]
// She every-day at-library read books. → She reads at the library every day.
// Sentence 4: Negation with 不
我不喝酒。
[S:我] [NEG:不] [V:喝] [O:酒]
// I not drink alcohol. → I don't drink alcohol.
// Sentence 5: Negation with 没
他昨天没来。
[S:他] [T:昨天] [NEG:没] [V:来]
// He yesterday not-completed come. → He didn't come yesterday.
// Sentence 6: 吗 question
你喜欢中国菜吗?
[S:你] [V:喜欢] [O:中国菜] [Q:吗]?
// You like Chinese-food @question? → Do you like Chinese food?
// Sentence 7: Question word in-situ
你在哪儿学中文?
[S:你] [P:在哪儿] [V:学] [O:中文]?
// You at-WHERE study Chinese? → Where do you study Chinese?
// Answer: 我在大学学中文。[P:在大学] fills the slot.
// Sentence 8: V-not-V question
你想不想吃饭?
[S:你] [V:想不想] [V2:吃] [O:饭]?
// You want-not-want eat food? → Do you want to eat?
// Sentence 9: Topic-comment
这个电影我看过。
[TOPIC:这个电影] [S:我] [V:看] [ASPECT:过]
// this movie = I.watch.experienced() → This movie, I've seen it.
// Sentence 10: Full S-T-P-M-V-O
我们下午三点在公司认真地开会。
[S:我们] [T:下午三点] [P:在公司] [M:认真地] [V:开] [O:会]
// We 3pm at-office seriously hold meeting.
// → We're having a serious meeting at the office at 3pm.
// Sentence 11: Negation + Time + Place
他今天没在学校吃午饭。
[S:他] [T:今天] [NEG:没] [P:在学校] [V:吃] [O:午饭]
// He today not-completed at-school eat lunch.
// → He didn't eat lunch at school today.
// Sentence 12: Question word (who) in subject slot
谁想喝咖啡?
[S:谁] [V:想] [V2:喝] [O:咖啡]?
// WHO want drink coffee? → Who wants to drink coffee?
// Answer: 我想喝咖啡。(I want to drink coffee.)
// 谁 → 我. Same slot. Clean swap.

Runtime Summary

/**
 * Chinese Sentence Runtime v1.0
 *
 * EXECUTION RULES:
 * 1. Default word order: S-V-O (like English)
 * 2. Extended signature:  S-T-P-M-V-O (time & place BEFORE verb)
 * 3. Topic-comment:       TOPIC, S-V-O (topic fronted, commented on)
 * 4. Negation:            不 (general) or 没 (past/completion) → before verb
 * 5. Questions:
 *    a. 吗 particle     → append to statement (yes/no question)
 *    b. QW in-situ      → replace unknown with question word (wh-question)
 *    c. V-不-V          → verb-not-verb (yes/no, slightly more direct)
 *
 * INVARIANTS:
 * - Verbs never change form
 * - Modifiers go BEFORE the thing they modify
 * - Word order is the ONLY grammar mechanism
 *
 * NEXT MODULE: The Type System (Measure Words)
 * → Every noun needs a "type annotation" when counted. Let's learn why.
 */

You now understand how the Chinese runtime executes sentences. The word order rules are simple, strict, and logical — exactly the kind of system an engineer's brain is built to handle. Next up: Module 2: The Type System, where we learn that Chinese has its own version of type annotations — measure words. Every noun gets one. No exceptions.

Practice what you learned