Slide 18
Slide 18 text
compound covers
●
C structs on steroids
➔
Point: cover { x, y, z: Float }
●
Stack vs Heap allocation
➔
p := (3.0, 6.0, 7.0) as Point
➔
init: func@ (=x, =y, =z) {}
●
By-value semantics
●
Per-method by-ref semantics with func@
➔
norm: func -> Float { Math sqrt(x*x + y*y + z*z) }
➔
set: func@ (=x, =y, =z) {}
ooc-lang.org
III. Syntactic sweets