We should provide some foundational mixins that might be widely used as part of this package.
I have been working on porting some of those into the feature-mixins branch. The mixins I am thinking of:
Are there any other ones we should have?
We might also then want to consider removing/deprecating any foundational Classes from dojo/core.
I suppose the point of this is that since we'd use compose for factories/mixins, either these need to go here, or core would need to depend on compose (which would create a circular dependency). I'm a little worried that people wouldn't think to look for such foundational things in compose, since while they use compose, they seem tangential to it.
How do we present this so that it makes sense and users don't miss it (i.e. looking in core instead)?
Well, and I think core depending on compose would essentially mean compose would have to go into core, which would bloat core and we would be well on our path to dojo/dojo again. In fact, I think things like Streams in core shouldn't be in core, but that is another subject for another day.
We are going to have a lot of packages (not as many as lodash). Discoverability and tutorials will be how people don't miss this. I think it will be the rare developer who would use compose without a fair amount of the eco-system, so with the tooling, most people wouldn't even realise that there is a package named compose or that there are foundation factories in the package.
Of course it could be argued that these could just go into their own repo (e.g. dojo/mixins) which would be a clear set of "common" mixins used. I don't know if that makes any more sense, but I think we should tend towards breaking more stuff out and squishing it together with the build tools, but just not to the extreme of lodash.
Ok, I have added createStateful to the branch. It does not actually have a run-time dependency on RxJS Observables, it is only a build time dependency.
Add Foundational Mixins
* Adds `createDestroyable`, `createEvented` and `createStateful` mixins as foundational mixins.