2 ms·
Another interesting weird syntax I ran across a few years ago is OGDL: https://ogdl.org/ https://ogdl.org/ It's sort of an alternative to S-expressions with mu
by kragen 4y ago
Another interesting weird syntax I ran across a few years ago is OGDL: https://ogdl.org/ https://ogdl.org/
It's sort of an alternative to S-expressions with much less punctuation, but the data model is slightly different — in S-expressions you label the leaves, and in OGDL you label the nodes. In other contexts these node-labeled trees are sometimes called "rose trees"; they are the basic data model of, for example, Prolog. Labeling nodes is almost equivalent to labeling arcs, but OGDL does support multiple references, so not quite.
The OGDL proposal was intended for data, like XML, not programs. They started out by trying to simplify YAML, which has arrays and dicts, and they simplified it by unifying them into a single structure.
Here's one of their examples:
network
eth0
ip 192.168.0.10
mask 255.255.255.0
gw 192.168.0.1
hostname crispin
This is not quite just an edge-labeled digraph because, as in S-expressions, the order of arcs within a node is significant; you can have multiple edges with the same label in the same node, and you can select edges by ordinal rather than, or in addition to, label.
This is of course amenable to use as a programming syntax.