Has anyone written an INI parser in tango?

Bill Baxter wbaxter at gmail.com
Fri Sep 12 20:02:46 PDT 2008


On Sat, Sep 13, 2008 at 11:46 AM, Jesse Phillips
<jessekphillips at gmail.com> wrote:
> On Fri, 12 Sep 2008 17:17:55 +0900, Bill Baxter wrote:
>
>> 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
>> ----
>
> Ummm, isn't that what an ini file is? I assume it is not a .d file, as
> that would need compiled and thus defeat the purpose of using ini.

There are also the [section] thingys in an ini file.

But anyway, I've always associated ini files with Windows-specific
cruftery.  I guess from Windows' win.ini, system.ini etc.  Registry
.reg files and ".inf" files are also just ini files, basically.

But you've convinced me.   I was wrong.  INI is a super format with
lightweight syntax that fits the bill perfectly if all you need is to
save and load a few variables.  Especially if having a human-editable
format is important.

I've gained new respect for the humble INI.

Thanks,
--bb



More information about the Digitalmars-d mailing list