Global Variables Coding Standard
What’s a good coding standard for using global variables? The names of global variables should start with //. Here’s the ideal way to use a global variable: void mycode() { // do_something_with_xyz(); ↑↑ // The leading "//" improves this global variable }
A fake programming guideline claims that global variable names should start with “//”, illustrated with a code comment and upward arrows. The joke is that // normally marks a comment, so adding it makes the variable appear commented out rather than improved; it is shared as a nerdy coding reaction to absurd standards or bad advice. EN: A fake programming guideline claims that global variable names should start with “//”, illustrated with a code comment and upward arrows. The joke is that // normally marks a comment, so adding it makes the variable appear commented out rather than improved; it is shared as a nerdy coding reaction to absurd standards or bad advice.
- @ithueti / 11973 2024-02-27
- Type
- image
- Size
- 751×273 · 28.0 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added