Subject: Re: proplib changes
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Jachym Holecek <freza@NetBSD.org>
List: tech-kern
Date: 06/11/2007 12:33:43
# YAMAMOTO Takashi 2007-06-09:
> >   o Teach the library to support multiple codec backends,
> >     these are selected at compile time.
> >     See common/lib/libprop/prop_codec.c
> > 	common/lib/libprop/prop_xml.c
> > 	common/lib/libprop/prop_scn.c
> 
> i'm not sure if it's a good idea to guess the format by checking
> only a single character.
> isn't it better to make "SCN" have a little clearer signature so that
> it can be detected more precisely?

It was the simplest option that came to mind and works adequately...
I'm afraid clearer signature would complicate SCN a bit -- I'd like
to keep the syntax (and visual apperance) as simple as reasonably
possible.

> >   o Add a new codec (called "SCN") in addition to XML format.
> >     See common/lib/libprop/prop_scn.c
> > 	[example follows below]
> 
> > The format has been designed for low encoding overhead and relative
> > human-friendliness.
> 
> what's the intended usage of the new format?

No particular purpose. I wanted to have an alternative that looks
better to my eyes, and I wanted to have a way to easily add support
for new formats. To me SCN is easier to read/write because it looks
a bit like C and has minimal syntax.

I think if we provide a choice of plist format, it will also help
solve the "plists in /etc" question -- the user can just pick his
favorite format and proplib hides the difference.

	-- Jachym