Hacker News new | ask | show | jobs
by huahaiy 484 days ago
I wrote my library this way for both performance AND type checking reasons. You cannot tell me the reasons why I wrote my code my way. That is just absurd.

In any case, it is possible to write Clojure in a way that is type checked at compile time. And it is an acceptable way to write Clojure. I just want to clear the air.

1 comments

I'm not telling you the reasons why you write code the way you do. I'm just telling you about my experience of using the language, which clearly differs from yours. I never found protocols to be useful as a type checking tool, and I find they're not necessary for optimizations most of the time. I spent a lot of time profiling and optimizing Selmer, this is the only protocol that turned out to be necessary for performance https://github.com/yogthos/Selmer/blob/master/src/selmer/nod...

If you find protocols are a helpful tool to structure code that's great, keep using them. Nobody is telling you not to. However, try to accept that different people use the language in different ways. Try to follow your own advice and not to be dogmatic about it.