Subject: Re: XML config file
To: Jason Thorpe <thorpej@shagadelic.org>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-userlevel
Date: 07/22/2006 21:48:12
On Sat, 22 Jul 2006, Jason Thorpe wrote:
> I am planning on changing prop_object_type() to return an invalid object type
> identifier if the argument is NULL, so you will be able to collapse that into:
>
> obj = prop_dictionary_get(dict, "count");
> if (prop_object_type(obj) != PROP_TYPE_NUMBER)
> errx(...);
Ok, that would work.. I had thought it might be useful to be able to
specify the type when you did the get (ie prop_dictionary_get_number(dict,
key) or prop_dictionary_get(dict, key, type) , which would save the
function call though I guess its minimal anyway.
> > Although I think a standardised configuration format and parser is a
> > desireable thing, and I'm happy with the tree structure, I think that the
> > lack of readability in XML is a major concern.
>
> I guess I just don't find the XML unreadable. Again, that may be that I'm
> saturated in it at my Day Job :-) But also, I didn't want to create some new
> format, I wanted to use something that was already in wide use... and I don't
> think anyone can argue against OS X having the largest installed base of all
> of the BSD-derivatives :-)
Well, sure - I think they made some brave decisions and some right
decisions, but they have the graphical configuration interface built in,
which we dont (yet :) How many OS X users/admins have ever seen an XML
file? I'd say a low percentage - my sister has had an iBook for some
years and I bet she never saw any..
iain