dennis lustre

Dennis is a software engineer crafting intuitive and tasteful experiences users want to use.

Currently first engineer @Fuerte. Previously @Boundary Remote Sensing and @Thaddeus. Studied CS @UC Irvine.

last updated 07-30-2026
← back to projects

Lox Interpreter

objective

To implement the Lox language from Crafting Interpreters in Go, and to see what changes when error handling is a value rather than an exception.

my role

  • Language Implementation

tools

  • Go

team

Solo

duration

Personal project

context

A full Lox implementation in Go

Recursive descent parser and tree-walk interpreter, with mutable variables and scoped blocks.

error handling

One shape instead of two

The book threads exceptions through parsing and evaluation. In Go I used errors as values throughout, which collapses static and runtime error handling into the same shape — a parse error and a runtime error are both just a value you propagate.

It is more typing at every call site and considerably less thinking at the boundaries, which turned out to be the trade I wanted.

also

The same book, in OCaml

I worked through it a second time in OCaml. Different experience entirely — pattern matching over an AST is the thing the language was built for, and the interpreter loop nearly writes itself.