nowfound

Life & fun · June 1, 2017

“Statements and State”, the next chapter of my book on interpreters

“Statements and State”, the next chapter of my book on interpreters launched on June 1, 2017 with 141 votes, #259 of 3,107 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 9 years on.

In plain words

Statements and State" is a chapter from a book on interpreter design and implementation. It explains how to extend a basic calculator-like interpreter into a more functional programming language by adding variable binding and internal state management. The chapter addresses the need for named bindings to enable composition of software components, moving beyond simple expression evaluation toward practical program construction.

written from the facts on this page · September 2026

From the sources

All my life, my heart has yearned for a thing I cannot name. André Breton, Mad Love The interpreter we have so far feels less like programming a real language and more like punching buttons on a calculator. “Programming” to me means building up a system out of smaller pieces. We can’t do that yet because we have no way to bind a name to some data or function. We can’t compose software without a way to refer to the pieces. To support bindings, our interpreter needs internal state. When you define a variable at the beginning of the program and use it at the end, the interpreter has to hold on to the value of that variable in the meantime. So in this chapter, we…from craftinginterpreters.com

Does a similar job

all alternatives →
  • IW
    I Wrote a Book on Java2024 · ▲586

    https://www.manning.com/books/data-oriented-programming-in-j... This book is a distillation of everything I’ve learned about what effective development looks like in Java (so far!). It's about how to organize programs around data "as plain data" and the surprisingly benefits that emerge when we do. Programs that are built around the data they manage tend to be simpler, smaller, and significantly easier understand. Java has changed radically over the last several years. It has picked up all kinds of new language features which support data oriented programming (records,…

  • IW
    I wrote a technical history book on LispFeb 2026 · berksoft.ca · ▲252

    The book page links to a blog post that explains how I got about it (and has a link to sample content), but the TL&DR is that I could not find a lot of books that were on "our" history _and_ were larded with technical details. So I set about writing one, and some five years later I'm happy to share the result. I think it's one of the few "computer history" books that has tons of code, but correct me if I'm wrong (I wrote this both to tell a story and to learn :-)). My favorite languages are Smalltalk and Lisp, but as an Emacs user, I've been using the latter for much longer and for my…

  • I ported Tree-sitter to GoFeb 2026 · github.com · ▲222

    This started as a hard requirement for my TUI-based editor application, it ended up going in a few different directions. A suite of tools that help with semantic code entities: https://github.com/odvcencio/gts-suite A next-gen version control system called Got: https://github.com/odvcencio/got I think this has some pretty big potential! I think there's many classes of application (particularly legacy architecture) that can benefit from these kinds of analysis tooling. My next post will be about composing all these together, an exciting project I call…

  • Maybe Haskell2015 · books.thoughtbot.com · ▲60

    See what it’s like to program in a language without null.

  • A design-by-contract Python package in ~100 lines2022 · github.com · ▲58

    Greetings! A 2.5 weekends project to teach myself newer Python features (>= 3.10). Conditions are written as Lambda expressions that annotate parameters and return types, and coexist with type annotations. Symbols to share values between conditions are also supported to a limited extend.

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, June 2017

the whole month →