#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 08 Statements and State
#columns:Front	Back	Tags
Crafting Interpreters ch 8, Statements and State: what does it cover?	Statements and state: expression and print statements, global variable declarations, the environment that maps names to values, assignment, and block scope with nested environments.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::about
Crafting Interpreters ch 8, Statements and State: why does it matter?	Scopes and environments are where interpreters get interesting, and every closure bug later traces back to understanding this chapter.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::why
Crafting Interpreters ch 8, Statements and State: which part of the book is it in?	jlox (tree-walk interpreter, Java)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::part
Crafting Interpreters ch 8, a common trap: “Not restoring the previous environment when a block throws.” What's the catch?	Use try/finally as the book does.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::trap
Crafting Interpreters ch 8: what traps should you watch for?	<ul><li>Treating assignment to an undefined variable as an implicit declaration.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::traps
Crafting Interpreters ch 8: which end-of-chapter challenges are worth your time?	Challenge 1 (make the REPL print bare expressions) is a nice usability win. Challenge 2 (runtime error for uninitialized variables) changes semantics, so keep it on a branch. Challenge 3 is a scoping puzzle; answer it before running.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::challenges
Crafting Interpreters ch 8, Statements and State: how should you work through it?	Draw the environment chain for a few nested blocks. Run the shadowing examples in the chapter and predict the output before running.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::08 cracked.guide::kind::approach
