MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y1rd5z/commentsinjson/19sylnrbsteub/?context=3
r/ProgrammerHumor • u/Recent-Analysis-6880 • 8d ago • 1
205 comments sorted by
View all comments
Show parent comment
80
Comments are specifically useful for config data, and should just be human readable descriptions of what the field does.
35 u/noaSakurajin 8d ago Also they allow you to test changes to the config by simply commenting out that line. When editing Configs over ssh this is significantly faster that removing the line and is easier to revert. 7 u/Ixaire 8d ago Yes but parsing comments to render them in documentation is definitely relevant.That's why Knuth invented literate programming: https://en.wikipedia.org/wiki/Literate_programmingAnd that's also why XSD has specific documentation fields in addition to the standard XML comments. 1 u/herrkatze12 8d ago That's actually one case where it might be useful
35
Also they allow you to test changes to the config by simply commenting out that line. When editing Configs over ssh this is significantly faster that removing the line and is easier to revert.
7
Yes but parsing comments to render them in documentation is definitely relevant.
That's why Knuth invented literate programming: https://en.wikipedia.org/wiki/Literate_programming
And that's also why XSD has specific documentation fields in addition to the standard XML comments.
1 u/herrkatze12 8d ago That's actually one case where it might be useful
1
That's actually one case where it might be useful
View all comments
Show parent comment
80
u/herrkatze12 8d ago
Comments are specifically useful for config data, and should just be human readable descriptions of what the field does.