Conversation
Notices
-
"Outperforming Imperative with Pure Functional Languages" by Richard Feldman
vid.puffyan.us/watch?v=vzfy4EKβ¦
www.youtube.com/watch?v=vzfy4Eβ¦
> Once I got deeper into functional languages, including pure functional ones, I was surprised to discover that they could actually outperform imperative languages - not just in tasks generally considered "well-suited" to functional programming, but sometimes even in cases considered well-suited for imperative programming!
-
The above video is about the Roc language. I havent watched it yet, but people who linked to it said it includes a functional-style implementation of QuickSort.
When you compile such a thing naΓ―vely it contains truckloads of copying and is unusable, but supposedly Roc is smart enough to translate it into an efficient in-place implementation.
www.roc-lang.org/
#roc #RocLanguage #functional #FunctionalProgramming #QuickSort #optimization #OptimizingCompiler
-
2001: Oh yeah, so your fancy functional-style programming is supposed to be able to perform as well as explicit imperative code just so long as you have a wiki.c2.com/?SufficientlySmart⦠? So tell me, when is this mythical compiler supposed to enter into existence?
2021: Oh, about now.
-
"Functional But In Place" languages according to the comments: Roc, Lean, Koka.
Koka is the one I got hits on when I tried to remember what Roc was called, as Koka seems to have been the first or most well-known to have been used for a paper with a functional-looking in-place-executing quicksort.
https://libranet.de/dev/null#FunctionalButInPlace #FBIP #LeanLang #KokaLang #Koka
-
The video is as advertised and it's pretty cool. It goes through the strength and challenges of imperative and functional and then talks about the techniques that can bridge them, like static reference counting, which is what allows for replacing copying with in-place operations "when nobody's watching".