Currently Context must be default constructed but there's situations where one might want to disable regex or chrono dependencies, or switch them up with alternative implementations (e.g. oniguruma).
I agree having those methods is a good default (though I'd feature gate them to allow reducing dependencies), but adding a Context::new can't hurt and something like:
Prefer using Default as it contains functions required for casting and good defaults, or at least copy the casting function from Default.
in Context::new documentation should be enough to point users in the right direction.
Or maybe include casting functions in Context::new and add Context::empty as well with a warning in the documentation.
Currently
Context
must be default constructed but there's situations where one might want to disableregex
orchrono
dependencies, or switch them up with alternative implementations (e.g. oniguruma).I agree having those methods is a good default (though I'd feature gate them to allow reducing dependencies), but adding a
Context::new
can't hurt and something like:in
Context::new
documentation should be enough to point users in the right direction.Or maybe include casting functions in
Context::new
and addContext::empty
as well with a warning in the documentation.