Edit: Some have noted Group Policy and its note field. I've disqualified that because it's not readily available in Home versions of Windows, because third-party applications are often not bundled with the necessary ADM/ADMX files necessary (which you might also want to comment), and the fact that the parent commenter disqualified the text-based REG files (which supports comments).
https://docs.microsoft.com/en-us/previous-versions/windows/d...
Comments would be nice, but they'd get lost in loading and dumping.
Moving beyond pure hierarchy, and having first class ordering, where comments are real data objects that survive import would probably be the way to go.
Something like slightly less verbose XML might be a great thing.
Regedit is a table editor of that database. So again, would you insert random records into a database as comments?
Now if you're asking "why aren't there comments in .REG files" the answer is there are, prefix it with a semicolon (not well documented):
https://docs.microsoft.com/en-us/previous-versions/windows/e...
Probably wouldn't have been difficult to guess though, since they follow the .INI file syntax (which ironically is now used by SystemD)
A database stores whatever data is necessary for the application. If comments for application records are needed, that includes comments.
A self-documenting registry where applications registered user information about keys that they used (whether or not the application populated them) as well as apps populating data for keys, so that navigating to a key in the UI would provide you with the documentation from any app or apps concerned with that key as well as the ability to review and edit the data value would be awesome.
The only places in my legacy databases where these are populated emerged from the Erwin data modeler. We are lazy in not populating them with new tables.
I wonder if SQLite has something similar.
Which highlights the difference between the registry and an rdbms. In an rdbms you can absolutely comment the columns and tables, just not the rows and individual data points.
In the registry, the data isn't tabular. Every data point has a corresponding field name. That name absolutely would support a comment in sql.