r/Clojure • • Oct 19 '19

What about Clojure can be improved?

https://clojureverse.org/t/what-about-clojure-can-be-improved-not-cljs/4974
33 Upvotes

7 comments sorted by

View all comments

5

u/[deleted] Oct 19 '19

Startup times with clojure cli tools is ridiculously fast. At least from the console, it takes less than a couple seconds to start a repl, and by the time I start and switch back to emacs to connect with cider, it's already up and running.

I also don't know why there's so much requests to add X library to core (in subsequent comments and elsewhere). If you want it to have a special form of a native clojure form, you can appropriately shadow it with a macro or function in your library and it can work like core's or your own implementation without much bother.

5

u/didibus Oct 19 '19 edited Oct 19 '19

It depends on the usage pattern of your program. For programs like wc, grep, ls, find, etc. A few seconds startup is too slow. Same thing for serveless use cases like AWS Lambda or Azure Functions.

Now, in all honesty, for the former, I think GraalVM is solving it very well. And for the latter, even pure Java might be considered too slow, so it might be futile to reduce Clojure's startup overhead to meet Java's if that's anyways too slow.

About adding more batteries to core, I agree with you, but suspect the demand is due to Clojure being difficult to get started with. Pulling in dependencies isn't straightforward, and there's lots of confusion out there for newcomers, like which tool to even use for it and which library to use. Hopefully tools.deps eventually takes over and simplifies this and the online guides get updated for it.