How Do You Name Your Goto Labels?

How Do You Name Your Goto Labels?
goto-memes, legacy-code-memes, switch-statement-memes, code-quality-memes, bad-naming-memes | ProgrammerHumor.io

Someone looked at production code and found a switch statement with goto labels named "title" and "here". Not "handle_error" or "cleanup" or even "retry_loop". Just... title and here. It's like the developer was playing a twisted game of "name things as vaguely as humanly possible." What does "title" even mean in this context? Is it the title of their resignation letter? And "here"? Thanks, I can see it's here. That's what labels do. They exist at a location. The real horror is that this code probably works perfectly fine and has been running in production for years, maintained by someone who's too scared to refactor it because nobody knows what breaking "goto title" would actually break. Legacy code: where goto statements and existential dread collide.

More Like This