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

Terrible advice. It's the exact opposite of "Tell, don't ask".

Performance of an if-statement and for-loop are negligent. That's not the bottleneck of your app. If you're building something that needs to be highly performant, sure. But that's not the majority.

https://martinfowler.com/bliki/TellDontAsk.html



Performance of any given CPU instruction is negligible, yet somehow they accumulate to noticeable values.


Amen.


consider his another post in somewhat similar spirit: https://tigerbeetle.com/blog/2024-12-19-enum-of-arrays/ the author is indeed working in a performance-oriented niche


He’s giving object oriented design the medal for cache locality’s victory.




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

Search: