Comment

Comment by dig1

I am not fond of the multimethods because they can easily tangle the code and give you a false sense of scalability. For example, in a blog post, "handle-action" is nicely decoupled with 3 different actions, but let's imagine how that will look after someone adds 20 new actions. Good luck debugging that.

Also, I saw numerous cases where people will copy/paste multimethod arguments without knowing what they are used for.

I still find case/cond more readable and way more performant, especially since the author uses the same type for a multimethod dispatch, but YMMV.

parent dig1 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton