Hacker News new | past | comments | ask | show | jobs | submit login

Thanks! I got a few answers already, all of which were really helpful, but this one was most extensive! Another one, if you’ve time: What would you improve in Clojure?



Hum, that's an interesting question.

Error messages could be improved, currently, they often leak the implementation details, so the error is disconnected from your actual code.

Startup time is slow. There's ways around, like making a Graal Native build, or using ClojureScript or babashka instead, but those are all alternative thing you need to consciously choose to use. It be great if standard Clojure somehow could start really fast.

Memory usage could probably be improved further. It makes liberal use of Objects right now for everything, and that adds up quickly.

Performance is pretty fast, but I'll never say no to something that would perform faster.

I think I would make the data manipulation functions eager by default, and the lazy one would be the opt-in one.

There's a few names that could be improved, contains? is a famous confusing one, since it always checks for key, would have been better to call it contains-key?

When it comes to the language design itself, I'm not sure there's much I'd change. I think it could be interesting to try and see if you could build some language that's like Clojure and have some level of static type safety. I'm not sure what you'd have to trade away for it, but I think it be an interesting experiment.

Oh, and one more thing, doing unboxed things, operating over primitives could be improved and made easier. This is often needed for high performance numerics, or making better use of memory and caches.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: