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).
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.
Re:Coroutines for Go
by MathMonkeyMan on Wednesday July 19, 2023 @05:54AM
(#36784047)
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
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?