|
|
Subscribe / Log in / New account

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

What is stopping you from passing a message in java? Or in any language?


to post comments

Toward a more approachable Rust

Posted Mar 3, 2017 17:36 UTC (Fri) by karkhaz (subscriber, #99844) [Link]

The lack of primitive support. I was mostly arguing against your assertion that Go "is setting back programming by decades". Quite the contrary---I'm hoping that future languages follow Go's trend of having channel-based concurrency as part of the language model.

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).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds