Re: [GD-General] A portable preferences library
Brought to you by:
vexxed72
|
From: J C L. <cl...@ka...> - 2003-12-05 15:15:21
|
On Thu, 4 Dec 2003 22:47:06 -0500
Brian Hook <ho...@py...> wrote:
> Originally I was thinking it would be a binary file format, strictly
> because I wanted the ability to serialize raw binary data "just in
> case". Now you could make a valid argument that you could always
> convert to text, i.e. 3.14 becomes "3.14", but maybe you don't want to
> suffer a data conversion loss or something, I dunno.
I wouldn't use a configuration system that didn't use flat text files,
but then I'm religious in that regard.
> foo=3D129ABC55
I ended up electing to use a leading typing string that identified the
encoding of the rest of the value. As such I had decimal, hex, a
variety of true/false forms, quoted strings, and ${value} substitution.
With the exception of the latter, which I did for pure geek value, they
all turned out to be absurdly useful.
--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
cl...@ka... He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
|