Toward a more approachable Rust
Toward a more approachable Rust
Posted Mar 3, 2017 16:34 UTC (Fri) by kjp (guest, #39639)In reply to: Toward a more approachable Rust by karkhaz
Parent article: Toward a more approachable Rust
Posted Mar 3, 2017 17:36 UTC (Fri)
by karkhaz (subscriber, #99844)
[Link]
Obviously you can do anything in any language and you can write a kernel in javascript and a web application in OpenCL if you really want to. But having domain-specific linguistic constructs shape our perception of how to think about solving the problem at hand. Nothing is _stopping_ you from passing messages around in Java, but there isn't anything that makes it particularly compelling either. The Thread/Mutex/etc classes in the Standard Library are mostly modelled after pthreads, and there isn't any Standard Library interthread channel implementation AFAIK---never mind language support.
It would be great if tomorrow's programmers end up thinking about concurrency in a message-passing style, rather than shared-memory style, by default. Having languages that express these ideas as primitives will go a long way toward ensuring that this happens. Pthread-style concurrency should be something that you only learn if you have to use it, rather than the default way of doing concurrency. Go is a pioneer in this regard (well, Erlang is even more of a pioneer, but it never caught on).
Toward a more approachable Rust