Playing around with a "system" concept, where a simple view of all the states can be created by (mount/system)
, and used.
This could probably be used for testing, although a simple :require
does not seem all that frightening in tests.
Yes, while a system created by (mount/system)
is an immutable map, its values can be changed by starting / stopping
the system: no difference from "other solutions" :), so yes lifecycle functions mutate the values in a system map. "Oh.. but in "other solutions" those are not tied to vars", ok.
This API is just a fun experiment to see whether the concept is at all useful.
Not yet. It does require some work and I am still skeptical it is really useful, since most of the things you would do with more than one system could be done with Mount but differently.
However I know people asked for it, so I already built a proptotype that does it with caveats, and it might come in later, most likely under the same API (i.e. (mount/system)
).
This was in mount since 0.1.9-SNAPSHOT
, so you most likely already have it, if not get 0.1.9-SNAPSHOT
or later.