3 ms·
It seems rather funny to write a treatise, with quicksort being a central example, where the shown code requires O(N) temporary space. C/C++ programmers might
by yongjik 7y ago
It seems rather funny to write a treatise, with quicksort being a central example, where the shown code requires O(N) temporary space.
C/C++ programmers might not be good at category theory, but no one worthy of their salary would walk past a quicksort routine with O(N) memory without stopping and asking "Wait, what?"
Seriously, I remember when this used to be the first Haskell code shown on haskell.org homepage, and I had to stop and wonder if these folks were just trolling or if they are actually that oblivious of performance. If you want to promote Haskell, you could have hardly chosen a worse piece of code.
- Cybiote 7y agoThe article addresses that issue, its core thesis is that AI supports declarative programming. One of the author's main points is that a sufficiently intelligent compiler would rewrite code to be better optimized and have better computational complexity, eliminating low level C++ programming type jobs. Category theory is to support the creation of specifications that are both easy to understand for a human who knows category theory and easy to optimize for the AI, compared to the original quick sort example. The author also thinks many HTML and JS type jobs will also disappear. What I am skeptical of is that while Go, Chess and Jeopardy are challenging, they are closed domains. I think people underestimate just how much complexity building CRUD apps involves. Just like we underestimated how difficult walking to a cupboard to retrieve a mug would be for AI.