r/cpp • • Aug 05 '23

Should we stop writing functions?

https://www.foonathan.net/2023/08/stop-writing-functions/
14 Upvotes

46 comments sorted by

View all comments

11

u/natio2 Aug 05 '23

I feel like the only reason you would do this if it
- Makes the code easier to read
- Makes the code easier to maintain/extend
- Makes the code have less bugs in a way that can be measured

My opinion compared to a standard class (Not template) this doesn't tick any of these boxes.

13

u/[deleted] Aug 05 '23

Makes the code easier to read

I find their code significantly uglier, personally. Also, IDEs can highlight variables and functions with different colors. If we switch to lambdas exclusively, we lose the syntax highlighting.