5 ms·
Re "core.async is macro sugar on top of java.util.concurrent" - yes, but also no. Java does not (yet) have a way to spin light-weight processes that can park wi
by puredanger 6y ago
Re "core.async is macro sugar on top of java.util.concurrent" - yes, but also no. Java does not (yet) have a way to spin light-weight processes that can park without consuming a thread OR a way to select/alt over multiple parked ops, so being able to do that in Clojure is actually novel (and enabled by having macros that can rewrite code as a state machine).
There have been a few projects that did this in the past on Java using runtime bytecode modification but none of them are widely used afaik.
This will change once Project Loom lands in Java and provides m:n fibers.
- fooster 6y agoYes, yes in the future at some undefined point java will be better. Meanwhile go works very well today. And you don't need to be saddled with the JVM and the very bloated java ecosystem.
- ashes-of-sol 6y agoCould you expand on the problems you see with the JVM and ecosystem? I was skeptical, but it hasn't been a problem for us so far, and having java libraries and good java interop has helped us more than it has hurt.
- deleted 6y ago[deleted]
- nojito 6y ago>very bloated java ecosystem Why waste time reinventing what java has already solved?
- armitron 6y agoLife is too short to waste on Java? Yes, some of us really find Java that bad. Plenty of other languages have solved the same problems in much better ways (as demonstrated by this very discussion re: asynchronicity). I'll pick Go over Java, Erlang over Go and wouldn't pick Java (incl languages running on top of) for anything today.
- nojito 6y agoWhy not? The java ecosystem has solved so many problems already. Don’t you want to just focus on the business problems?
- armitron 6y agoI don't solve business problems, I solve my own problems and try to have fun along the way.
- lostcolony 6y agoThe business problem still can include things like "concurrency", which is just -painful- in Java, especially if I/O bound. I much prefer languages that make easy stuff harder, but hard stuff easier, than languages like Java that make easy stuff easier, and hard stuff harder.
- waheoo 6y agoJava doesnt solve business problems. It solves enterprise ones. Or at least claims to.
- pjmlp 6y agoEnterprises do business last time I checked.
- dkersten 6y agoThe Java ecosystem has solved many business problems, for me and plenty of other people I personally know, both in small startups and in large companies. Just because you are personally prejudiced against Java for some reason, doesn't mean that its not a good ecosystem, because it is. I don't like Java the language (and certainly not the crazy frameworks), although it has improved, but the ecosystem, especially from Clojure, is fantastic.
- bcrosby95 6y agoI usually find immutability to be more important than this particular detail. Because of this my preference is usually Elixir/Erlang, followed closely by Clojure (for the potential interop with a huge ecosystem), with languages like Go and Java fairly close to eachother but pretty far down list. I would love it if Clojure on BEAM were more mainstream.
- pron 6y agoSure, sometimes a simple, crude runtime will do, but if you need really good performance and low-overhead deep observability, you might want to be saddled with something that's more state-of-the-art.
- didibus 6y agoRegarding Java, sure. But in the context of Clojure, it's here right now as well, no need to wait for anything. I also don't really understand the "bloat" comment. What do you refer too? Are you referring to the fact the JVM supports too many features?