Hacker News new | ask | show | jobs
by tathougies 2675 days ago
> Your datastructure is never going to be more than 10-100 deep. Don't worry about it. Just write the most legible recursive algorithm, not the most performant.

What? Try computing the 1000th fibonacci number.

1 comments

I agree as it is important to know your boundaries. But I also like the GP prefer legible over performant code whenever it is obvious that I am not going to need more performance. In almost all cases I encountered the necessity to optimize code the reason was I/O bound. I don't recall any instance of algorithmic performance being a problem.
Tco has little to do with timing performance and all to do with keeping code legible in functional languages.
In FP that implements actor model, for example, you will be in a world of hurt if you don't TCO your actor - has nothing at all to do with legibility.