“This has come up several times on the forums, but I've never written it up in a standard place, so here it is: There are only three ways to get run-time polymorphism in Swift. Well, three and a half.”
My CLI tool Depo, which aims to manage dependencies for #Clojure projects, which conveniently has many different formats of configurations, seems to be the perfect place to use #protocols
and #multimethods.
After rewriting the dispatch flow three times, I feel like this is the cleanest my abilities have been able to get it. Would be cool if someone would take a look-see and let me know if protocols/multimethods makes sense in this context!