4 ms·
Related: what's the right way to extract inline comments regarding function API stuff from source code? This seems like something that is a really good idea, b
by DannoHung 11y ago
Related: what's the right way to extract inline comments regarding function API stuff from source code?
This seems like something that is a really good idea, but is hard to find any projects for it.
- jack9 11y agoI remember reading about failed experiments from the 90's to separate inline comments from source code through a form of duplication. Mark a "source" folder and a "documentation" folder. Every time you open a file in the source folder structure, create a duplicate file in the documentation folder structure (including folders and nesting). Comments are expandable blocks with markers for start and end of code that they apply to in a side-by-side pane. Viola, inline comments without inline cruft. Version it all and you're good to go. When I have time, I will try to recreate it as an IDE plugin for someone...when I have time.
- brwr 11y agoI've thought about this a bit and personally came to the conclusion that extracting inline comments is a bad idea. They are inline for a reason. By way of example, I frequently use inline comments to discuss things like how a given class is architected, which (if any) popular design patterns are used, usage examples, etc. This stuff is really only relevant when you have the file open in your editor, so inlining the comments makes perfect sense.