611
you are viewing a single comment's thread
view the rest of the comments
[-] jballs@sh.itjust.works 8 points 5 months ago

Nah, refactoring this would be a bitch. Your function name contains everything that happens in the function. Which means if you add something to it, you also have to change the name of the function. So CallThisWhenThePlayerTakesDamageAndIfThePlayerHealthIsLessThanZeroThenAlsoTheyDie would have to go to something like CallThisWhenThePlayerTakesDamageAndIfThePlayerHealthIsLessThanZeroThenAlsoTheyDieAndIncrementTheTotalDamageTakenCounter if you added something else.

[-] Hotzilla@sopuli.xyz 11 points 5 months ago

IDE renames all references, no issue

this post was submitted on 28 Mar 2024
611 points (100.0% liked)

Programmer Humor

32065 readers
403 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS