Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All programming is made up of data structures and algorithms. A program could be all data structure, a mixture of the two, or all algorithms. In a perfect world, where a team has infinite time and money and a perfect understanding of the problem, it would be all data structure and no algorithm.

Algorithms are technical debt.



This may sound good to someone but it doesn't make good sense. Data structures aren't free, they take space. Therefore there is a trade-off between space and compute complexity. And ultimately data structures don't transform themselves, an algorithm has to do the transformation...

Once you modeled your problem into some data structures you now need to make the decision of whether or not the transformation between input and output is easily achievable with an algorithm, if not then you need to further break down the problem into more data structures or your design is flawed.


Yeah, I agree with most of what you put here. I'm mostly speaking to the articles point where we are in an alternate reality with different built up structures. When thinking about going purely data structure, I was thinking something like Church Encoding[0] or Prolog.

Is that practical today? No. The effort required to get a full program created at that level of detail would be enormous. Technical debt is in itself not a bad thing, and I'm not saying anyone in this realities goal should be no algorithms.

[0]: https://blog.ploeh.dk/2018/05/22/church-encoding/


What sidpatil said. This whole comment section is indicating there is a yawning gap in my understanding of system design.


This sounds interesting to me. Can you please provide an example so I can understand this better?


Well no one has infinite time and money and a perfect understanding of any complex problem yet, but I think the F# DDD[0] overview can show an example much closer to more data structures and less algorithms.

[0]:https://fsharpforfunandprofit.com/ddd/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: