I’m worried I’ve become blind to issues that plague Clojure, as I’m not really able to answer these questions:
- What about Clojure can be improved?
- What would I change about Clojure to make it better?
I can think of only a few minor things:
- Error messages could be more indicative of the actual cause and the exact line of code.
- A few functions could have had better names, like
contains?could have been
- More things in core could have been protocols.
- Certain quirks related to Java are annoying, and it be nicer without them. For example, the forced directory structure of namespaces, the file names being underscores, some things in the REPL can’t reload like defmulti, classpath is confusing, reliance on exceptions, utf-16 instead of utf-8, etc.
- A few things could be removed, that are mostly deprecated,
usedeclarative for example.
- And some really nitpicky edge cases could maybe be smoothed out, like a mode to disable chunking on lazy seq so when you need true 1 at a time lazyness you could get it easily.
Ifwithout an else branch could be an error to force the use of
condcould have used the same syntax for their default branch. An easier way to avoid boxing when doing numeric math. Things like that.
And I can think of a few more major ones:
- Startup times are slow, and could be made faster.
- Overall performance could be improved, especially memory use, and reducing garbage.
- Overall tooling could be made easier to get started with.
- More compile time errors could be reported by the compiler, like the things clj-kondo reports on, and rudimentary type errors could be caught a la SBCL, there could be a warning if a lazy context has escaped certain bounds, etc.
- A bit more manpower behind it, so we could see more activity on core.async, core.logic, etc.
That’s about it from me. I really had to scratch my head hard to find these, which makes me feel pretty good about Clojure, but I’d be interested in hearing other’s thoughts on this as well, so what about Clojure can be improved and what would you change about it?
P.S.: I’m focused on Clojure only for now, so no ClojureScript or ClojureCLR, etc…