this post was submitted on 21 Nov 2023
414 points (96.8% liked)

Programmer Humor

36916 readers
365 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 2 years ago* (last edited 2 years ago) (3 children)

I don't see the need for an if block or renaming the function and leaving it there. It is extra unnecessary work for the compiler. Comments are probably the best way. Might also copy the current file, put the original in some folder like "old", and delete the old code inside the new copy.

[–] [email protected] 9 points 2 years ago* (last edited 2 years ago) (1 children)

Comments are the worst as they are ignored by refactoring. That's the reason if (false) is actually really good for temporarily disabled code.

[–] [email protected] 1 points 2 years ago

I never thought of that. That's quite smart!

load more comments (1 replies)