Original text(via Lobsters)
Programming a language
- This is the companion article for this talk.
- The full code for this series can be viewed here.
In the past couple of years, I’ve had to implement two (very simple) programming languages for two different companies. I found the experience to be extremely fun, and have thus decided to study the subject a little more in depth - because yes, that is how a reasonable person does it: only after I’m done solving a problem (twice, no less!) will I study how one should actually go about it.
And since it’s a fun thing to study, I’ve started giving informal live coding sessions on the subject at work. This series will follow these sessions, as I find it a good and motivating way to prepare them.
- Introduction
- Representing source code
- Taking decisions
- Naming things
- Reusing code
- Repeating actions
- Identifying invalid programs
- Inferring types
- Enforcing typing rules in the AST
- Producing a typed AST
- Interpreting a typed AST