#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 07 Evaluating Expressions
#columns:Front	Back	Tags
Crafting Interpreters ch 7, Evaluating Expressions: what does it cover?	You make expressions run: a tree-walking evaluator over the AST, mapping Lox values to Java objects, truthiness, equality, runtime type checks and runtime error reporting.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::about
Crafting Interpreters ch 7, Evaluating Expressions: why does it matter?	This is the moment your interpreter actually computes something. Mapping a dynamic language's values onto a host language is the core design decision of any interpreter.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::why
Crafting Interpreters ch 7, Evaluating Expressions: which part of the book is it in?	jlox (tree-walk interpreter, Java)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::part
Tree-walk interpreter: what is it?	A tree-walk interpreter executes a program by recursively evaluating the nodes of its abstract syntax tree, with no compilation to another form.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::definition
Tree-walk interpreter: Are tree-walk interpreters used in real languages?	Yes, mostly early in a language's life or where simplicity matters more than speed. Many mature languages moved to bytecode VMs or JIT compilers later.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::definition
Crafting Interpreters ch 7, a common trap: “Printing doubles: whole numbers should print without a trailing .0, as the book shows.” What's the catch?	The test suite checks exact output.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::trap
Crafting Interpreters ch 7: what traps should you watch for?	<ul><li>Comparing Java Doubles with == instead of equals, or mishandling nil equality.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::traps
Crafting Interpreters ch 7: which end-of-chapter challenges are worth your time?	Challenge 2 (string concatenation with a non-string operand) and challenge 3 (division by zero) make you decide semantics and implement them. Do challenges that change Lox's behavior on a separate git branch. The cracked.guide check runs the official test suite for this chapter, and a challenge that changes semantics (new syntax, different errors) can make tests fail on main.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::challenges
Crafting Interpreters ch 7, Evaluating Expressions: how should you work through it?	Write the evaluator, then try every operator with wrong types to see your runtime errors. Compare how Lox equality and truthiness work with your favorite language.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::07 cracked.guide::kind::approach
