#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 12 Classes
#columns:Front	Back	Tags
Crafting Interpreters ch 12, Classes: what does it cover?	Classes: class declarations, instances with fields, property get and set, methods, this bound via a small closure, and initializers with init().	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::12 cracked.guide::kind::about
Crafting Interpreters ch 12, Classes: why does it matter?	Seeing how objects, methods and this are built from closures and maps explains a lot about JavaScript and Python object models.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::12 cracked.guide::kind::why
Crafting Interpreters ch 12, Classes: which part of the book is it in?	jlox (tree-walk interpreter, Java)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::12 cracked.guide::kind::part
Crafting Interpreters ch 12: what traps should you watch for?	<ul><li>Returning the wrong value from init() when called directly.</li><li>Forgetting to bind this when a method is accessed but not immediately called.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::12 cracked.guide::kind::traps
Crafting Interpreters ch 12: which end-of-chapter challenges are worth your time?	Challenges 1 (static methods) and 2 (getter methods) are both good. Challenge 3 is a design discussion about encapsulation. 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::12 cracked.guide::kind::challenges
Crafting Interpreters ch 12, Classes: how should you work through it?	Implement in order and test after each step. Work through the explanation of how this is bound by an extra environment; draw it.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::12 cracked.guide::kind::approach
