by Gibbon1 · 11y ago · 0 comments
Offhand years ago I used a dialect of C that had no recursion so I can see both sides of this argument. On the one hand, there is a pain point when you don't have access to recursion. On the other, boy can a compiler that eschews recursion produce small and fast code. (Because without recursion the call graph is acyclic)
quicksort [] = []
quicksort (x:rest) = quicksort [y | y <- rest, y <= x] ++ [x] ++ quicksort [y | y <- rest, y > x]Are you really implying that if recursion was turned off in a modern compiler it could create better code?
Just saying, you add a feature to a language, you will pay something for it.