(no title)
hyperpallium2 | 3 years ago
In this D2 example (https://d2-lang.com/assets/images/intro-example-a917149ff3b7...), the diagram is nicely designed to be centered on the nexus node crawler. But the choices of which side the tributary nodes are on is not. You might want cron below and ps->express below - or to the sides.
The grammar can be extended to accommodate this (maybe already has been), but what is the semantic meaning of above, below, left or right?
One semantic choice is made: the "persists" arc is unidirectional, and is presented left-to-right - a natural order for many languages.
(Technically, "declarative" needn't be "semantic", but arguably is the most useful one)
Aeolun|3 years ago
alixanderwang|3 years ago
hyperpallium2|3 years ago
I think it'll be more like ordered keys in JSON - not ordered, according to the spec, but very useful in practice, because easier to compare, locate keys by eye etc. This order might not merely be "the same" as the input happened to be, but an order customarily used - and there might be a semantic reason for that order in the first place, used in some original, non-JSON, representation.
Tenuous.
mcherm|3 years ago
But if that diagram drawing tool does not graduate to allowing me full control over every detail of the output (albeit that might be verbose or awkward) then it cannot grow with me as my requirements become more complex and it is good only for toy-sized or throw-away projects.
emmelaich|3 years ago