2 ms·
> He spoke of the potential for functional languages to provide a significant, intrinsic advantage when it comes to parallel computing. > (...) > If that were
by nextaccountic 4y ago
> He spoke of the potential for functional languages to provide a significant, intrinsic advantage when it comes to parallel computing.
> (...)
> If that were true, you'd expect that the many existing functional programming languages would have already satisfied this need. But in my opinion, they haven't
Well there is https://futhark-lang.org/ https://futhark-lang.org/ - it runs on the GPU, and is awesome.
On the CPU side, I think that Rust plus https://github.com/rayon-rs/rayon https://github.com/rayon-rs/rayon was a huge breakthrough on writing parallel programs using both functional and imperative programming, and future languages should learn from its successes. The ownership system & the borrow checker, plus other type-level features like the Send and Sync traits, were essential to enable sharing read-only data between threads without synchronization, or sharing read-write data with synchronization, all checked at compile time for data races (which is a huge problem to solve, and is something that neither Go nor Java protects against at compile time)
Indeed Futhark shares a key feature with Rust: it uses uniqueness types to enable in-place updates, which is kind like a limited form of Rust ownership: if you are the sole user of some memory, you can update it and other code will be none the wiser. This kind of thing is very important to build functional programs that are performant in practice.
- tsegratis 4y agoFair point It may be better to see rust as sitting between functional and imperative paradigms
- klavinski 4y agoSee also the Higher-Order Virtual Machine for a functional, non-garbage-collected, and parallel runtime: https://github.com/HigherOrderCO/HVM https://github.com/HigherOrderCO/HVM
- nextaccountic 4y agoHey, that's pretty cool! The lang that targets this runtime is https://github.com/HigherOrderCO/Kind https://github.com/HigherOrderCO/Kind