Re: Breaking change between YAML 1.1 and 1.2 with multiple documents

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <CADJiDhuvksnLXbYumTCaz2B_vHuPoeo9x=Ta7UtnRwSTA47ppQ@mail.gmail.com>
I concatenate YAML files together all the time, but I don't do it randomly
:-)

Agreed %TAG isn't really used. Most usage of YAML are in the context of a
single application, where tags aren't very useful. If you take out the
requirement that the YAML file has "semantics" beyond the specific
application that reads it, then it is possible to simplify the spec, but
there are also dangers in that approach.

On Wed, Jul 23, 2014 at 8:22 PM, Ingy dot Net <[email protected]> wrote:

> 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.
>

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.