FWIW, I think the "use case" of randomly concatenating YAML files, and trying to ensure they still make sense, is totally bogus. I think we should have called BS on it a long time ago.

Nobody would ever expect a syntax to work that way. It's like concatenating 2 arbitrary Python files. All bets are off.

The fact that we use this use case to back up language decisions, is a bad smell.

...

While I'm here, I should mention that directives themselves seem to be a bad smell. First off, there are only 2 of them, which makes it feel kludgy, I feel like I've written about this here: https://github.com/yaml/YAML2/wiki but I can't see it at the moment. I'll add something later...

I think we could lose the directives in a YAML 2.0. YAML documents have never stood on their own. They need an outside context to give them any meaning. There are a couple general contexts (schemas) that are well understood:
  1. Be like JSON, as much as possible by default.
  2. Whatever the Load/Dump of a framework decides is best for a language. As long as the loader roundtrips what the dump dumps, YAML is safe within that language/yaml-framework.

The general point though (and this goes over the heads of 99.9% of YAML users) is that (without context/schema) any YAML stream can mean *anything*. ie the YAML {foo: bar} could (conceivably) load the same as the JSON [1, 2, 3].

So given that, the TAG directive, seems like it could be moved elsewhere (just like all the other context), and YAML directive could too. I can't recall ever seeing a YAML directive in the wild.




On Wed, Jul 23, 2014 at 9:12 AM, Oren Ben-Kiki <oren@ben-kiki.org> wrote:
Yes. It is a trade off. The decision was to make it safe to concatenate streams/documents (we also did work on the document markers to make it more robust).


On Wed, Jul 23, 2014 at 6:43 PM, Trans <transfire@gmail.com> wrote:
Duh. right.‚Äč

So in 1.2 they apply per-document and not per-stream?


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Yaml-core mailing list
Yaml-core@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yaml-core



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Yaml-core mailing list
Yaml-core@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yaml-core