2 ms·
This is an extremely terrible defence/criticism, for many of the reasons pointed out by others already, but I’ll add some more: INI came from Windows, and if yo
by chrismorgan 3y ago
This is an extremely terrible defence/criticism, for many of the reasons pointed out by others already, but I’ll add some more: INI came from Windows, and if you’re going to call it INI I think it’s reasonable to expect it to work with Windows’ INI functions—or else you can call it conf, embracing the still-very-ad-hoc format used across Linux and such. (And yeah, I recognise that the library name invokes both labels, but beyond that they’re focusing on INI.)
But not one of the INI examples shown will actually work as you’d expect using Windows’ GetPrivateProfileString function. Windows’ INI-reading functions are extremely simplistic; about the most magic thing is case-insensitivity of keys. You can’t put a space around the equals sign: that gives you a key name that ends with a space and a value that starts with a space. There are no line continuations (section 5). You can’t do what they call a composite configuration file (section 8). Empty keys (section 10) are fine. Implicit keys (section 12) don’t work.