Writing a Compiler - Language Design
Things we want
- Small and simple syntax.
We will apply UX Concepts to Language Design, this implies removing
choice, and making things evident.
- Compiler will be written in C.
- The goal is to achieve extremely fast compilation times.
- The resulting code must also perform well.
Things we want to avoid
- No global variables
- No undefined values
- No variable shadowing
- Bounds checking
Variables must be initialized at declaration. The language does not define a
Null type or value.
= and ==
Similar looking operators can be hard to spot and cause unintended behavior.
One way to fix this would be by changing the grammar, so the
Case without break
= operator can only be used in
Statements and not