4 ms·
I'm genuinely curious: what advantage accrues to a programming language designed for concurrency that you can't get with a good concurrency library for an exist
by RyanMcGreal 16y ago
I'm genuinely curious: what advantage accrues to a programming language designed for concurrency that you can't get with a good concurrency library for an existing language?
- technomancy 16y agoImmutable data structures are several times more useful if they're built-in to the language because all libraries assume you're using them. There's no technical reason they couldn't be added on with a 3rd-party library, but it's really a cultural thing.
- lukev 16y agoSyntactic support, immutability semantics, and compile-time limitations on side-effects. Of course, it's POSSIBLE to do everything with a library + discipline. For example, I can import the Clojure jar and use Clojure's data structures and STM in a Java program. But it is _very_ verbose, and you have to know that certain variables are immutable, or that certain operations are illegal in certain places, etc, rather than having that information encoded into the language.
- silverlake 16y agoSafety. You can do anything in C, but the language/compiler can't help you at all. So languages with support for a feature can help you perform that task more easily and catch some errors for you. That applies to GC, concurrency, distribution, failure handling, and on and on.
- billmcneale 16y agoNot much, really, the benefits of intrinsic support for concurrency in languages are very overhyped. Java is a great illustration: it has syntactically close to no support for concurrency (synchronized, pretty much) but it has been able to keep up with today's concurrency challenges by the simple virtue of its libraries (java.util.concurrent is very, very powerful) and ingenuity of its developers. The amount of concurrent Java that powers major web sites and other places that we don't even know of is simply staggering.