3 ms·
As someone who uses the language. I think it's one of its most overlooked features. By convention comments are ignored, but the truth is they're not by the prog
by isaiahg 6y ago
As someone who uses the language. I think it's one of its most overlooked features. By convention comments are ignored, but the truth is they're not by the programmer. Comments are extremely important to keep track of what you're doing and reading other people's code. So I think this is a case where the convention doesn't meet the reality. Also using these features within comments makes it so every use of these extra features is documented and shows up in completions, so you the programmer always know what you're doing. I'm a fan haha
- vram22 6y ago>By convention comments are ignored, but the truth is they're not by the programmer. Disagree. It's more like the opposite is mostly true: By convention comments are not meant to be ignored, but the truth is they mostly are, by the average programmer. And most programmers are average, by definition of the word 'average' and by the bell curve law. Yes, with exceptions. Even if comments are not ignored in normal work, just wait for the next crunch to hit (which is mostly the default state or mode in many companies, anyway), and then see the fun. Every dev scrambling to hack the code any which way to meet the deadline / target / ship date, and now maintaining comments is a goal that flies out of the window. Been there, seen that, plenty, though also worked in places where that was not the case. Those are few in number, though. There can be other issues too, with compiler directives as comments. What if the directive-as-comment is itself now commented out, maybe as part of commenting out a larger surrounding block of code? Now you (and the compiler writer) have two problems :) http://regex.info/blog/2006-09-15/247 http://regex.info/blog/2006-09-15/247
- vram22 6y ago>>By convention comments are ignored, but the truth is they're not by the programmer. >Disagree. It's more like the opposite is mostly true: >By convention comments are not meant to be ignored Otherwise who on earth would write them? Who would like to write stuff that "by convention", is not going to be read?