Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
https://github.com/JuliaLang/julia/blob/master/base/complex.jl https://github.com/JuliaLang/julia/blob/master/base/rational.jl
I think the main difference in this case is conceptual, i.e. in Clojure you have a concrete piece of data (which you can send over the wire, etc), and you dispatch off a value from that data; so it's really intuitive and straightforward, no magic at all. While with types, you have to introduce some overhead (e.g. define the singletone type, or parse the value and wrap it in a type (possibly breaking all the code that uses it), etc). See e.g. this, where you dispatch directly on a key in a configuration map.