RFC: KConfig XT (KDE 3.2)

Waldo Bastian bastian at kde.org
Sat Mar 15 17:13:29 GMT 2003


On Saturday 15 March 2003 17:51, Neil Stevens wrote:
> On Saturday March 15, 2003 08:06, Tim Jansen wrote:
> > On Saturday 15 March 2003 16:38, Waldo Bastian wrote:
> > > * A formal comment structure needs to be designed that can convey
> > > type-information. Preferably in such a way that it is easily parsable
> > > by both machine and user.
> >
> > Where is the type information stored? I guess it would be sufficient,
> > maybe even easier, to store the type information only in the default
> > configuration file. And as this is a new file, it is not neccessary to
> > store it as comment. It would also be possible to extend the ini format
> > and maybe even create a new format (not sure whether this is useful).
>
> How about tacking on the name after the language?
>
> Name[en]<String>=MyApp
>
> The use of <> is easy to remember like C++, and it's a natural extension of
> what's already being done.

The use of < isn't compatible with our existing format. We could use

Name[en][!String]=MyApp

But I don't see any advantage in that actually. I do see two drawbacks:
* It makes the parser for the common case more complex (1)
* It becomes rather unreadable when you need to have more information than 
just a simple type. E.g. imagine you have an enumeration and want to specify 
all possible values as well. And what about descriptions?

(1) The meta-information (type-information) is a reflection of the 
applications internals, as such it is of no value to the application itself: 
it's the application that has determined that a certain key needs to be an 
integer in the range 1 to 5, the meta-information is there to communicate 
that design aspect to users (2) and more generic config management tools.

(2) Those users that are interested in this kind of stuff and bother to read
their config files.

Cheers,
Waldo
-- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com





More information about the kde-core-devel mailing list