Doesn't de-composing have the same issue, though?
var id = ecs.createEntity() // returns an int
ecs.addComponent(id, 'house')
ecs.addComponent(id, 'boat')
So, very different from the class-based approach being floated a few comments ago. Does that answer your question?Instead one can use `does` to mix in to an existing entity:
role House {}
role Boat {}
my \id = 42;
id does House;
id does Boat;
say id ~~ House; # True
(What's missing is the ability to drop a mixin once it's been added via `does`.)