with default, malli is all-immutable, with a CLOSURE_DEFINES or JVM Prop setup, the default registry can be swapped out in the user space.
allows also really smaller bundle sizes, moved all the def
s into defns
so closure can eliminate those if needed.
@plexus, would that help with your acme-schema sample?
also, the options would be default
(immutable) or managed
(swappable). any suggestions for better names?
yeah I think that would help us
even more evil. optional MUTABLE registry constructor, just pass in your own atom.
would it be possible to avoid having any mutable registry by having the user define his own API functions defaulting to their own registry?
maybe via a macro? (def-malli-api my-registry)
that is one approach, and can be done on top of the current api. Not a fan of macros generating functions personally. Need extra work to work with static analysis tools (like cursive) Also, the api should require all the malli namespaces to be complete.
I'll make set-default-regisyry!
to throw if the registry swapping is not enabled.