On Wed, 13 Feb 2013 21:29:46 +0100 Jacob Carlborg <[email protected]> wrote:
> > On 13 feb 2013, at 20:37, Walter Bright <[email protected]> > wrote: > > > > > On 2/13/2013 3:06 AM, Leandro Lucarella wrote: > >> Please, don't use json for configuration files, is a format > >> intended for machines, not humans (OK, is better than XML but > >> still horrible for humans). > > > > Json is simply a subset of javascript, which was intended for > > humans. > > > >> > >> If you need a standard and flexible file format that is almost as > >> good for humans and machines, maybe you want to consider YAML. > >> > >> Environment: > >> override: > >> name: value > >> baz: foo > >> default: > >> foo: bar > >> > >> But I still think a configuration file shouldn't be as complex as > >> YAML. > > > > Configuration files grow ever more complex, and it'd be nice to > > have a format that doesn't need constant redesign. > > > YAML is quite a flexible format. It support references, for example. > > Environment: &Environment > foo: 1 > bar: 2 > > Environment64: > <<: *Environment > bar: 3 > > Here "Environment64" will contain everything in "Environment" and > then override any values that is listed under "Environment64". > > It's also possible to implement new types in YAML. > IMO, SDL (Simple Declarative Language, not Simple DirectMedia Layer) beats the heck out of even YAML: http://sdl.ikayzo.org/display/SDL/Home It's just trivially simple and obvious with no syntactic noise. I had been a proponent of YAML, but my interest in it died completely after discovering SDL. YAML has less syntactic noise than JSON, but it's kinda complicated. I had started writing a D version of SDL last year but then got distracted. Definitely want to get back to it though. _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
