HACKER Q&A
📣 akasakahakada

Can we have advanced data structures and algorithms in standard library?


Fastest known algorithms are already there and still, everyone have to reimplement their own worse version.

How much actual productivity will be increased if people just provide everything on the textbook in a programming language out of the box?


  👤 wizzard0 Accepted Answer ✓
As much as I love algorithm-heavy tasks, I must admit 90% of software development is working with stakeholders on mapping the business needs to code.

And then the most advanced algorithms are usually just `git clone/cargo add/go get/npm install/your_other_pkg_mgr` away.

I'd say the standard library task is much more about providing powerful composable protocols to integrate all those libraries together (eg see Clojure, Elixir et al)


👤 Jensson
They are in standard libraries already. You have sorts, priority queues, hash maps, tree maps etc. The algorithms that are left are things that are hard to make a good interface for since they depend so much on what shape your data has.