So when using a composition, objects have state and agents that act upon that state?
This is not a concept in composition. In composition, every object has its own state, and objects communicate with each other only through their intended public API.
What the author of that video is demonstrating is mix-ins, and "state.foo" stands for "this.foo", because the code examples are avoiding using "this" for some reason.
2
u/logged_in_for_this Sep 24 '15
So when using a composition, objects have state and agents that act upon that state?