Backwards compatibility. I'm not remotely kidding here. There are still programs that directly parse these files instead of using Windows' APIs and the format itself is fragile, and in the 90's the concern was more of disk speed access (where commentswill slow down reading of registry files) meant that the designer have opted to not put comments (as you expect from that time that the manual is literally a book or a separate CHM or TXT file, with user comments stored at the "Notes" part of the book or another separate TXT file). It's similar to the binary DOC format pre-Word 97 which includes actual C pointers (so it's less of a document format and more of a snapshot of Microsoft Word memory).
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).
This has sort of existed since Windows NT 4.0 days in the form of Administrative Templates, with the newer "ADMX" format shipping with Windows Vista / Server 2008:
Human interaction with JS kinda sucks regardless. It's a good lowest common denominator of data, that is somewhat decent for hand editing when needed.
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.
Because you can’t automatically manage a configuration database that has comments. If the applications can remove and recreate their registry values and keys there is no way to keep comments associated with these things.
This idea is also the recommended workaround for JSON, and it is equally wrong there. For one thing, then you can only comment the key/folder/object, not the individual value.
> Because the registry is a database. Why would you put comments in a database?
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.
Oracle has user/all/dba_tab_comments and user/all/dba_col_comments.
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.
Ms SQL has extended properties, particularly the ms_description one that is exposed in ssms. But that's comments on database columns and objects, not data points.
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.