SDL vs. YAML
Sönke Ludwig
sludwig at outerproduct.org
Fri Sep 13 01:22:51 PDT 2013
Am 11.09.2013 18:14, schrieb Brad Anderson:
> On Wednesday, 11 September 2013 at 14:11:11 UTC, John Colvin wrote:
>> Why not YAML? It's cleaner than JSON and is very widely known.
>
> YAML is nice but can be surprisingly tricky to write by hand sometimes
> (especially for people not used to significant whitespace).
>
> Here's the discussion about JSON vs. YAML vs. SDL on the dub forum:
>
> http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
I have to admit that looking at the examples *now* leaves me with a
strong distaste for YAML. That wasn't the case in the beginning, but
now, after not having looked at any YAML document since then and even
with only the simplest syntax constructs used, it just looks confusing
to me.
Some points that stand out:
- Built-in field names and user defined dictionary key (can) look the
same and can be quite confusing (my initial reaction to the
"sub-package:" line in the example was "Hmm.. what kind of command
is *that*?")
- Indentation based scoping is much less explicit than braces. Someone
who has never seen the format may well think that it's just visual
formatting and has to read up on it first.
- It still has the deep nesting of the JSON format
- The complexity of the specification is a bit of a turn-off, too
Having said that, YAML for sure is a nice format for many things and
considerably more powerful in some areas than f.ex. SDL, but here I
think the focus should be on the most concise and intuitive textual
representation and IMO SDL does a better job there. More advanced
features of YAML, if needed, can also easily be simulated with SDL.
More information about the Digitalmars-d
mailing list