Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not a kernel programmer, and I haven't used Rust before, so take that into consideration.

Some of my favourite things about Ada is it's approach to concurrency, which (I think) is far superior to other imperative concurrent languages like Go. We should never have to deal with low-level primitives like semaphores and mutexes - it's 2018! Why are we stuck in the 80s?

I've heard that concurrency is difficult in Rust, but I've never used it, so I can't comment. I plan on learning very soon!



Interesting comment...considering concurrency in Rust is significantly safer to do.

This is the whole point of the borrow checker which is to ensure data-race free code.

The story with concurrency is still being worked out with async server-side applications which is coming together swimmingly!


> This is the whole point of the borrow checker which is to ensure data-race free code.

That's awesome! I never knew Rust had safer concurrency. I'm quite keen to learn it - just waiting for the time.


Not sure why I'm downvoted for this. I struggle to think of a "modern" imperative language that offers similar levels of safety and concurrency, aside from possibly Rust. Erlang is fantastic, but not imperative.

Go has channels, which is nice enough for message-passing behaviour, but nothing for elegantly sharing memory. ("Share memory by communicating" doesn't always work)

Things like conditional critical regions, monitors, and protected objects are much better abstractions for concurrency.


> I struggle to think of a "modern" imperative language that offers similar levels of safety and concurrency, aside from possibly Rust. Erlang is fantastic, but not imperative.

D


Doesn't D just have message passing & mutexes?

Which is fine, since D is supposed to be a better C.

I wouldn't consider its concurrent primitives comparable to Ada. This is to be expected, since I don't believe they aim for such a nuanced level of concurrency. The Ada runtime is incredibly huge and complex - it was created by the US military, after all.


One of the talking points of Rust is fearless concurrency.

Concurrency in Rust is not difficult (neither complex nor error-prone), but you have some high-level primitives that you must know how to choose and use.


We should never have to deal with low level primitives like functions and variables - it’s 2018 why are we stuck in the 50s?


That is an incorrect analogy. Semaphores are the "goto" statement of the concurrent world.

Semaphores are not typed. They is no semantic connection to the thing they protect. Debugging concurrent systems with mutual exclusion enforced through these low-level primitives is a nightmare.

If you forgot to lock/unlock, you'll never know! The compiler cannot check it. Deadlocks are imminent.

We've had better abstractions since the 80s. Conditional critical regions, monitors, and (ideally) protected objects. Hell, even guards are better than semaphores and mutexes - at least they are associated with their critical region!

I struggle to think of situations where a semaphore is the best choice. Maybe in extremely high-performance cases, but even then the compiler can usually make a better decision.


Well, Alan Key pretty much said that in the 70s, and has stuck to his high level guns all this time.




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

Search: