[RFC] Ini parser

bioinfornatics bioinfornatics at fedoraproject.org
Mon Feb 27 06:20:24 PST 2012


Le lundi 27 février 2012 à 13:44 +0000, Stewart Gordon a écrit :
> On 26/02/2012 15:58, H. S. Teoh wrote:
> > Just a quick follow up on:
> >
> > https://github.com/D-Programming-Language/phobos/pull/449
> >
> > I wasn't aware that .ini was deprecated by Microsoft. What's their
> > touted replacement for it?
> 
> The registry.
> 
> Besides, the code you've linked to seems to me to be an implementation not of M$'s .ini 
> format, but of something more general.
> 
> > Also, I know that there are applications out there that use the .ini
> > format, even though they aren't specific to Windows. To choose a random
> > example, the Opera web browser (I use the Linux version, and its config
> > file is in .ini format).
> 
> Yes, I think you'll find many cross-platform apps that store configuration in files rather 
> than in the registry.  In some of these cases, the developers chose the Windows .ini 
> format or something based on it.
> 
> FTR: While I was doing my PhD I created a configuration file format, which I called 
> Configur8.  It is similar to .ini, but with a different notation for section headings and 
> with one or two extra features such as importing another Configur8 file and overriding 
> some of the settings in it.
> 
> I implemented it in C++ and Fortrash 90.  I haven't got round to porting it to D, partly 
> as I haven't had use for it in my personal projects, but it would be straightforward once 
> I've managed to dig it up.
> 
> > Another example is git.
> >
> > So I think this might be something useful to have in Phobos. Just my
> > $0.02.
> 
> Is there an open-standard format that we can follow, other than one that already has a 
> different name (such as YAML or XML)?  IMM it makes little sense to have an implementation 
> of a proprietary or ad-hoc data format in Phobos (except possibly as part of a common API 
> supporting a variety of open and proprietary formats).
> 
> Stewart.

the code support default .ini spec and in more allow to have subsection



More information about the Digitalmars-d mailing list