4 ms·
5. To add sections to code Code is writing, would you write a technical book without sections and chapters?
by baby 4y ago
5. To add sections to code
Code is writing, would you write a technical book without sections and chapters?
- feoren 4y agoIf you can't organize your code into sections and chapters using the constructs provided by your programming language, for everyone's sake, get a better programming language. If you're not allowed to, get a better job. If you can't right now, then go ahead and use comments for that purpose, but I pity you.
- baby 4y agocomments are constructs provided by the language. QED :)
- feoren 4y agoIt's a semantic argument, but I'd say they're clearly not language constructs. The format of a comment is completely unspecified by almost any language. In the cases of something like JavaDocs, it may be structured, but it's a very different language than the primary. The only mechanism provided by the language is the 1- or 2- character escape hatch for exiting that language and entering unstructured comment-land. I suppose emergency exits are "provided" by a movie theater, but I wouldn't call them a function of the theater, nor a normal part of the theater's usage (hopefully!).
- baby 4y agoThey’re specified by the english language
- HenriTEL 4y agoYou should really use different modules/classes/files and folders/packages/namespaces for this.