Has anyone written an INI parser in tango?

David Wilson dw at botanicus.net
Fri Sep 12 10:10:52 PDT 2008


2008/9/12 Bill Baxter <wbaxter at gmail.com>:
>>
>> 4) It's simple enough to be edited from a command-line editor.
>
> It's not hierarchical.

I've always thought that was a benefit rather than a hinderence. It's
also untyped and supports comments. JSON certainly isn't a good format
to expose end users to.

INIs are also very amenable to having other software tweak settings,
whereas more complex formats can't always claim that (you ever tried
to write code that updates a bind configuration file?).

>
> But you're right, if you never have any plans to go beyond very simple
> key=value uses, then it's fine.  But if that's all you need then maybe
> you don't even need ini.  Just a file with plain old
> ----
> foo = bar
> x = y
> ----
> will do and you can just read the lines with a simple regex.
>
> That said I don't know the full spec of the ini format.  So maybe it
> has some tricks I'm not aware of.
>
> --bb
>



More information about the Digitalmars-d mailing list