Re:Codata in action, or how to connect FP and OOP
by amboo7 on Monday August 10, 2020 @02:50AM
(#24106338)
Common Lisp Object System had multiple dispatch for ages. Some other religions do not like it.
[ Parent
| on HN ]
Re:Codata in action, or how to connect FP and OOP
by StefanKarpinski on Tuesday August 11, 2020 @09:58PM
(#24127909)
A subtlety we've discovered through success and growth of Julia is that even if your language has some solution to the expression problem, if it's has non-zero cost and isn't the default then people won't actually use it, which undermines much of the benefit. Systems like CLOS, Clojure and even R, which have multimethods but where they're opt-in and use slow hash-based implementations, don't in practice see most of the benefits that we've seen in Julia from multiple dispatch in terms of code reuse and composability. Another way to say this is that if multiple dispatch is just a feature that you reach for when you need to do something fancy, then it looks like just another feature; when it's ubiquitous it becomes transformative.