Statements and State · Crafting Interpreters
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.
8 Statements and State 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
Explore this link on the map →related reading
- Resolving and Binding · Crafting Interpreterscraftinginterpreters.com
- The Lox Language · Crafting Interpreterscraftinginterpreters.com
- Evaluating Expressions · Crafting Interpreterscraftinginterpreters.com
- Classes · Crafting Interpreterscraftinginterpreters.com
- Functions · Crafting Interpreterscraftinginterpreters.com
- Control Flow · Crafting Interpreterscraftinginterpreters.com
- Scope (computer programming) - Wikipediaen.wikipedia.org
- Representing Code · Crafting Interpreterscraftinginterpreters.com
- Scanning · Crafting Interpreterscraftinginterpreters.com
- Parsing Expressions · Crafting Interpreterscraftinginterpreters.com
- Introduction · Crafting Interpreterscraftinginterpreters.com
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu