On Fri, 15 Feb 2013 02:47:48 +0100 Leandro Lucarella <[email protected]> wrote:
> Nick Sabalausky, el 14 de February a las 16:39 me escribiste: > > On Thu, 14 Feb 2013 20:39:33 +0100 > > Jacob Carlborg <[email protected]> wrote: > > > > > > > > On 13 feb 2013, at 21:53, Nick Sabalausky > > > <[email protected]> wrote: > > > > > > > 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. > > > > > > > > > After a quick glance at that page it looks more complicated than > > > JSON. I would consider YAML less complicated than JSON. > > > > > > > It's actually very simple. Everything is a tag, which is basically > > of the form: > > > > [namespace:]name [values] [attributes of the form name=value] [{ > > children > > }] > > > > A basic ini-style list of names/values is just: > > > > first "Joe" > > last "Smith" > > age 17 > > addr "123 Road St." > > Why wouldn't you keep using the ini format then? > The point of the discussion was the idea of using an existing format that's more powerful than ini instead of just taking on extra features to our ini-system: "I also suspect we are reinventing JSON files badly with dmd.conf. Maybe dmd.conf should be redone as a json file." - Walter Unlike JSON (which Walter mentioned), SDL doesn't add needless syntactic noise. And compared to YAML (which someone else mentioned), SDL has a simpler, easier to understand and non-indent-based syntax. But like JSON and YAML, SDL is much more powerful than INI. Some examples from the SDL site: # List numbers 12 53 2 635 # Map pets chihuahua="small" dalmation="hyper" mastiff="big" # Tree plants { trees { deciduous { elm oak } } } # Tree w/ various attributes and datatypes folder "myFiles" color="yellow" protection=on { folder "my images" { file "myHouse.jpg" color=true date=2005/11/05 file "myCar.jpg" color=false date=2002/01/05 } folder "my documents" { document "resume.pdf" } } So as long as we were discussing JSON/YAML, I thought I'd point out SDL. _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
