Hacker News new | ask | show | jobs
by jonathanstrange 1066 days ago
I'm a bit surprised about the lack of languages that parallelizes code automatically as much as possible, but only as far as measured performance suggests. It requires a semantics that supports concurrency, for example iteration over sequences needs to be in unspecified order by default, and also rests on whole program flow analysis, but I see no principle obstacles.

Hasn't Microsoft done some research on such a language years ago already? There is also ParaSail made by someone from the Ada community. What happened to these projects? Nobody uses them?

3 comments

Languages built on the BEAM VM like Erlang and Elixir support concurrency at the runtime level, though it's up to you to specify when you want to run something in parallel. Or am I missing why they don't fulfill your requirements?

I'm not sure if it's desirable to parallelize code automatically, as in many cases you do need at least _some_ parts of the code to run synchronously. But it's an interesting thought experiment to have parallelism be the default instead of opt-in.

Guy Steele Jr. worked on a language called "Fortress." There are a few good talks that he gives:

- (toy problem) https://www.youtube.com/watch?v=ftcIcn8AmSY

- (parallelism) https://www.youtube.com/watch?v=dPK6t7echuA

- (languages) https://www.youtube.com/watch?v=dCuZkaaou0Q

Turns out that autopar is an extremely hard problem beyond simple use cases. And for simple use cases existing solutions work fine (pragma omp for goes a long way for example).