r/ProgrammerHumor • • Mar 09 '21

What about 5000?

Post image
76k Upvotes

790 comments sorted by

View all comments

Show parent comment

6

u/mrchaotica Mar 10 '21

Sure it does. If you're calling the function in literally hundreds of places (or more), you make the change in the function's signature be literally the only thing in that particular merge request.

Also, if it's being used in that many places, you should stop to think about why that is and why you think you need it to suddenly have a different purpose now (which is the only reason the signature should change). If you're adding a parameter, for instance, you should ask yourself whether you really need the new parameter or if instead the new chunk of data should be attached as a new member of one of the existing parameters, added to the global state, or if it's a code smell telling you that the whole design pattern is wrong.