I recently came across KDL when searching for a data language that makes it easy to compactly write out a structured document. It seems likely it isn't widely known about, at least among general HN readers, so I wanted to share it.
If you haven't seen it before, you might be tempted to think "how is this different than e.g. JSON?", but I suggest it will make more sense if you think about it as "XML without the baggage".
Even if you don't use KDL, you might enjoy seeing its use of "slashdash comments" -- this is a great idea to steal if you ever write your own language! [1]
package
name my-pkg
version "1.2.3"
// ... rest of example at https://kdl.dev
// "Slashdash" comments operate at the node level,
// with just `/-`.
/-this-is-commented {
this entire node {
is gone
}
}
}
[1] Other languages have it -- this first one that comes to mind is Clojure which allows commenting out of an expression with `#_` (a reader macro): https://clojure.org/reference/reader#_dispatch
If you haven't seen it before, you might be tempted to think "how is this different than e.g. JSON?", but I suggest it will make more sense if you think about it as "XML without the baggage".
The most recent top-level mention on HN I found is here: https://news.ycombinator.com/item?id=37249430