In vim, whenever I add a comment like this
int somevar = 100; //XXX Some Comment Here
The "XXX" part of my comment gets automatically highlighted. "TODO" in a comment also gets highlighted similarly. I've used these myself quite widely to mark todos/draw attention, but never bothered to learn what makes "XXX" and "TODO" special. What makes these two words special?
Are there are other special words in comments that automatically get highlighted?
To exact revenge upon or punish someone.
FIXME comments are often used to indicate code that does not work correctly or that may not work in all supported environments. This may be necessary during the implementation of new functionality but FIXME comments should not be present in stable code.
In general, a TODO is written to tell future maintainers about something important: something that should be added, or should be changed, or should not be forgotten. The intention is often to increase the quality of the code. Sometimes a TODO comment can save you a lot of time!
- TODO to indicate planned enhancements.
- XXX to warn other programmers of problematic or misguiding code.
Source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With