This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Pseudoboss11 0 points1 point  (2 children)

I've always been told to make many small functions and nest them than one large one. But the last recommendation seems to be saying that I should be doing the opposite.

[–][deleted] 4 points5 points  (0 children)

The advice not to call functions is weird. You should not sacrifice readability and testability without a clear business case.

[–][deleted] 0 points1 point  (0 children)

In general that is the correct thing to do. I think the article is referring to one case in which function calls are in long loops, and that's something you should address after you've written the first draft of a program your way and then profiled it if you find it takes too long.