614
you are viewing a single comment's thread
view the rest of the comments
[-] jballs@sh.itjust.works 7 points 7 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 7 months ago

IDE renames all references, no issue

this post was submitted on 28 Mar 2024
614 points (98.1% liked)

Programmer Humor

32410 readers
295 users here now

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

Rules:

founded 5 years ago
MODERATORS