Live data from Hacker News

Why the Windows Registry sucks technically (2010)

rwmj.wordpress.com

1–10 of 342 posts

Re: Why the Windows Registry sucks technically (2010)

#4
This is a weird article because you can't talk about the structure of the Windows Registry without talking about INI files [1]. Example:

    [owner]
    name = John Doe
    organization = Acme Widgets Inc.
Some comments on the post mention INI files. It's mentioned by commenters in the previous HN submission too.

But the Registry was built like it was to easily translate INI files into a semi-filesystem structure.

[1]: https://en.wikipedia.org/wiki/INI_file

Re: Why the Windows Registry sucks technically (2010)

#6
I don't feel like this article is good enough to be worth resharing 12 years later.

It missed some of the key reasons why the Registry is bad and other criticisms ("We have to write exactly the bytes Windows expects." yeah of course you do. It's only meant to be changed using APIs.) are not very well thought out.

The criticism that the Registry is a janky filesystem in a single file is dismissed because you can do the same thing with ext3. That's not a good reason to dismiss it. Just because you can do a similar thing doesn't mean it is a good thing to do for the Registry. The Registry being a single file is a cause of a ton of problems, and is IMHO the root of all the other problems. If this were a better technical article it would go into that instead of hand waving it away. (E.g. it being a single file leads to the all or nothing nature of it. It necessitates the bad filesystem implementation instead of using the actual underlying filesystem, etc.)

Re: Why the Windows Registry sucks technically (2010)

#9
I really appreciate when people use technical facts to criticize something, like with this. It is a well written take-down of the implementation of the Windows Registry as of both today and 2010.

I suspect if the concept of the registry was created today it would look more like a database (e.g. Sqlite), although organizing it like a virtual FileSystem does have a certain appeal, and unfortunately I don't know of a database engine that supports such a layout. The Registry's Key-Value pairs are 1:1 with a database table's column-values pairs, it is just the multiple tiers of organizing "folders" above that that are a difficult implementation detail.

The UNIX way is undeniably more flexible since it isn't a virtual filesystem, it is just a filesystem. The problem is that everyone invented their own configuration format to store configuration data in /etc and there's no format agnostic API to access that information (you can open it, but can you understand it?).

Both UNIX and Windows suffer from the same orphan issue wherein information can be written, the application removed, and it is unsafe to ever remove it since you may not know the author and or all consumers.

Post reply on HN