2 ms·
extra long functions promotes breaking them down into smaller functions.
by jlebrech 12y ago
extra long functions promotes breaking them down into smaller functions.
- deckiedan 12y agoOf course - absolutely. No-one disputes that (seriously). The difference ends up being between a 5 line function, which does 5 simple things, and a 20 line function that does 5 simple things. In my previous example, it was 1 line which returned either the name, or 'New Name', or else 5 lines to do the same. In the end, not a big deal. A matter of taste, rather than judgement, I feel.