Closed MichalMarsalek closed 1 month ago
It could be solved by tooling, but yeah, you are right.
The current proposal is not backwards compatible because of the fact that comment lines can be arbitrarily indented. For example,
- value
# comment
which means ["value"]
in current NT, but ["value\n# comment"]
under the proposal. To me, this is kind of a dealbreaker.
We would need to interpret only otherwise error lines as continuations, which would make this much less elegant and quite confusing. Or we could require comments to be aligned to the parent, but that also breaks backwards compatibility.
I agree. This issue is a deal breaker. But even ignoring this issue, I think this proposal is not a good fit for NestedText. It was too limited and added too much potential for confusion.
Two years ago a created a nested format with strings, lists and dictionaries for my personal use that was surprisingly similar to NestedText. While it was a bit less elegant than NestedText and still required some escaping, there was one thing that was imo nicer than in NestedText - it supported unannounced multiline strings. In my understanding from quickly reading the docs, I don't think there would be any ambiguity in allowing
and
as shorter alternatives to
and
I'd love if this was added into the syntax if I'm not missing any clashes.
PS: I added NestedText to https://en.wikipedia.org/wiki/Comparison_of_data-serialization_formats .¨ EDIT: Well it was reverted. Apparently it needs a Wikipedia page first.