Hacker News new | past | comments | ask | show | jobs | submit login

A problem with semantic markup is when it doesn't do what you want, and you need to wig-wam it. Does this mean you actually wanted presentation markup? Or, since you are trying to convey meaning, does it mean that the semantics aren't rich enough to describe what you mean?

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)




If there is semantic meaning in where your options are (or you want to assign it anyway) then an automatically generated diagram is probably a bad fit.


before introducing anything, I'd like to see more instances where something needs to be on one side of something else, which I haven't found to be the case in software architecture diagrams.


It's more a research question.

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.


Having a diagram drawing tool that automatically lays things out in an elegant fashion by default is really wonderful -- especially when I am just getting started on any given project.

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.


It's bidirectional if that helps. That's the outstanding feature to me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: