I find that one can do object-oriented things, but constructors are a bit of a catch.
struct A : [a, defaulted]
struct B : A [b]
//You can do it this way,
//but each subclass has to init every field (brittle)
function MakeA(a): [a, 99] : A
function MakeB(a,b): [a, 99, b] : B
//Or use the super constructor syntax
//but this uses a copy and is less efficient
function MakeA(a): [a, 99] : A
function MakeB(a,b): [super MakeA(a), b] : B
//Or something in between
function InitA(me::A, theA): a = theA; defaulted = 99; me
function MakeA(a): new := [0,0]; new.InitA(a)
function InitB(me::B, theA, theB): me.InitA(theA); b = theB; me
function MakeB(a,b): new := [0,0,0]; new.InitB(a,b)
I'll keep playing with it and see what else I discover. I haven't gotten far enough to use coroutines, multi-method, or to make my own control structures yet.
the second option is the intended one, yes. I'd only switch that out to first one if you ever found that allocating objects is the bottleneck in your code, which it shouldn't be.
I find that one can do object-oriented things, but constructors are a bit of a catch.
I'll keep playing with it and see what else I discover. I haven't gotten far enough to use coroutines, multi-method, or to make my own control structures yet.