Expanding Phobos from a flat hierachy

Jacob Carlborg doob at me.com
Thu Feb 7 00:19:50 PST 2013


On 2013-02-06 18:35, Jens Mueller wrote:

> How about using YAML/JSON?
> name: dwt
> source: git://github.com/jacob-carlborg/dwt.git

The reason is that it will come a need for having conditions, variables 
and similar in the YAML/JSON file. So instead of creating a new format, 
or extending YAML/JSON with conditions and similar it's just easier to 
use a fully fledged language instead.

DSSS is a perfect example of that it's a bad idea to invent a new 
format. DSSS build scripts are basically an extended variant INI files. 
It do support some kind of conditions:

[main.d]
buildflags += -L-L.
version (Windows) {
     # do stuff
}

It just happens that if you but the first brace on its own line, or 
skips the space between the closing parenthesis and the opening brace it 
can't parse the file. That's that things I like to avoid by using a 
fully fledged language.

That's way I originally chose Ruby, because it can look just like JSON:

foo = {
   a: 3,
   b: 4
}

With Ruby you can get a syntax that is declarative, just like JSON/YAML.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list