#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 27 Classes and Instances
#columns:Front	Back	Tags
Crafting Interpreters ch 27, Classes and Instances: what does it cover?	Classes and instances in clox: class objects, instance objects with a fields hash table, and get and set property instructions.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::about
Crafting Interpreters ch 27, Classes and Instances: why does it matter?	Shows the real cost of dynamic objects: every field access is a hash lookup, which is why engines like V8 invented hidden classes.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::why
Crafting Interpreters ch 27, Classes and Instances: which part of the book is it in?	clox (bytecode VM, C)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::part
Crafting Interpreters ch 27: what traps should you watch for?	<ul><li>Forgetting to blacken new object types in the GC, which causes use-after-free bugs.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::traps
Crafting Interpreters ch 27: which end-of-chapter challenges are worth your time?	Challenges 1 (handling missing fields gracefully), 2 (dynamic field access by string) and 3 (deleting fields) all involve language design choices; pick one. Challenge 4 asks about faster field access, which connects to hidden classes.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::challenges
Crafting Interpreters ch 27, Classes and Instances: how should you work through it?	Remember to mark new object types in the GC. Run under stress GC again.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::27 cracked.guide::kind::approach
