#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 18 Types of Values
#columns:Front	Back	Tags
Crafting Interpreters ch 18, Types of Values: what does it cover?	Tagged unions for Lox values in C (numbers, booleans, nil), type checks in the VM, runtime errors, and new instructions for comparison and logical not.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::about
Crafting Interpreters ch 18, Types of Values: why does it matter?	Tagged unions are how dynamic languages represent values in a statically typed host. This design shows up in Lua, JavaScript engines and Ruby.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::why
Crafting Interpreters ch 18, Types of Values: which part of the book is it in?	clox (bytecode VM, C)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::part
Crafting Interpreters ch 18: what traps should you watch for?	<ul><li>Accessing the wrong union member without checking the tag first.</li><li>Forgetting to reset the stack after a runtime error.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::traps
Crafting Interpreters ch 18: which end-of-chapter challenges are worth your time?	Both challenges are design discussions about instruction set size versus speed; think about them and maybe benchmark one idea.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::challenges
Crafting Interpreters ch 18, Types of Values: how should you work through it?	Draw the memory layout of the Value struct. Check sizeof(Value) on your machine.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::18 cracked.guide::kind::approach
