Re: Tag Spec

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <CADJiDhuYaH9WizzxV54__We8SjOfK6M+UGLVmi6Kk_whMF5XLg@mail.gmail.com>
The question isn't one of ease of parsing (we all know YAML isn't easy to
parse :-). It is a matter of ambiguity. The !<verbatim> syntax was added
very late in the game, to allow avoiding the tag prefix games.

The thinking isn't "domain" vs. "local", the thinking is "full arbitrary
URI" (inside <...>) vs. "suffix added to some arbitrary URI prefix"
(without the <...>). The difference between "!", "!!" and "!foo!" is just
"which URI prefix should we use here".

If we said "we don't attach any prefix if what follows the "!" looks like a
complete URI" we'd be entering a world of pain. URIs can be in all sort of
forms: "urn:isbn:0-395-36341-1" is a URI and hence (if someone wanted) !<
urn:isbn:0-395-36341-1> would be a valid (if somewhat insane) tag. So
"looking like a complete URI" isn't really easy to define. "Looking like a
tag URI" is well-defined, but YAML really doesn't insist on using "tag
URIs", even though we call the "node type tags", well, tags.

Have fun,

Oren Ben-Kiki



On Sun, Feb 3, 2013 at 8:02 PM, Trans <[email protected]> wrote:

> I was reading over the spec on Tags. There is an aspect of it that is
> confusing. To the general viewer, it is not intuitive that the following
> tag is not a "domain" tag:
>
>     --- !tag:foo.org:org
>
> It is actually a local tag with a very domain-esque name. The correct tag
> is:
>
>     --- !<tag:foo.org:org>
>
> That's a very technical distinction and I think too difficult.
>
> Would it be acceptable to just designate domain tags as any tag that
> contains a `:` or `/`? I realize it might not be as efficient to parse, but
> it would be a whole lot more comprehensible to humans.
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> Yaml-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/yaml-core
>
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan

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