07. The compiler is not your therapist
Lexical basics, types, Option, functions, control flow, and reading diagnostics like an adult."
The compiler is not your therapist
You have manifests, modules, and imports. Now the compiler wants to talk about types—the relationship where one party sets boundaries and the other pretends to listen.
This chapter is the first language-syntax tour: enough to read real .bd files and understand why the analyzer is mad. Normative grammar lives under language meta; we stay informative and link out.
What you will find here
Section titled “What you will find here”| Section | Topic |
|---|---|
| Lexical basics | Tokens, identifiers, comments, literals sketch. |
| Types and generics | Nominal types, ref, generics—no null. |
| Option and nullability | Option<T> only. |
| Functions and methods | Calls, receivers, dispatch sketch. |
| Control flow | if, match, loops—read spec for full grammar. |
| Read a diagnostic | Spans, codes, fixing vs arguing. |
Previous
Section titled “Previous”06. Monorepo as coping mechanism
After this chapter
Section titled “After this chapter”Later tutorial tracks cover public API idioms and documentation comments (see book appendix / reference). For exhaustive rules, use platform spec language meta and semantic rules.