|
|
|
|
|
by dig1
1274 days ago
|
|
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. |
|
If your method only needs 1 argument then why should the other ones matter? I don't see a problem here. clj-kondo will guide people to name them as _ or _thing anyway so you don't even need to think about it.