Subject: Re: proplib changes
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 06/19/2007 12:01:38
On Mon, 11 Jun 2007, Jachym Holecek wrote:
> # YAMAMOTO Takashi 2007-06-09:
> > 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.

Perhaps the first line of the file could have a magic signature, like
"#SCN" or ";SCN"?  I don't think that would detract much from the visual
simplicity, but it would make automatic format detection more robust.

> > > 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.

Have you considered using an existing format, such as
YAML <http://yaml.org/>, JSON <http://www.json.org/>, or
SDL <http://www.ikayzo.org/confluence/display/SDL/Home>?

--apb (Alan Barrett)