Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> TOML also is a good example of "creating problems instead of solutions": They deliberately (!) broke compatibility to the INI format due to "I can't stand unquoted strings". Yeah, emotional feelings about CONFIG FILE FORMATS.

INI is hard to parse because without quotes the parser would not know whether it’s a “True” as a string or True as Boolean value. Formal parser that can be included into a program as a library and would reliably generate internal config representation (e.g., read config file into an object in application memory that will be used to modify the behaviour) is a good thing and TOML helps with that while INI does not.



Yes, agreed. On the other hand, there are quite a few people using Javascript, a language where this distinction also isn't really done in a clean way.

If you would de-serialize an ini-file into Objects in memory you would typically have meta-data about your object (RTTI/Reflection for compiled languages, given for scripting languages).

But yes, INI isn't without flaws. Parsers typically will need to accept everything from "true", "True", True, true, 1, "1" for boolean fields.


Schemas are often better than syntax typing. In other words the program decides what the type is, not the file.


If the schema allows union types, I don't want to deal with unquoted strings.


You don’t deal with syntax period. Union types are not desirable with configuration with the exception of |null perhaps, which should receive a default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: