Re: Question about type tags
William Spitzak <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Just to follow up, we are using tags.
A big advantage so far is that the tag is optional and it is easy to
ignore it when reading. This allows further compression by omitting the
tag when the reader knows the type, which happens a lot, but it is still
ok if the writer wrote the tag.
This proposal:
>>> - a: { name: nameofa, a: value of a }
>>> - b: { name: nameofb, b: value of b }
seems a little strange in that it looks like a list of objects with one
member for each type. If the second '-' was not there it would be
setting both the 'a' and 'b' members and a yaml validator would think
this is ok. It is nice that this can be stored as JSON but I have given
up on that.
I think the description of tag syntax is confused in the YAML
documentation. Would prefer that the leading '!' be considered a token
indicating a tag and the tag itself be the rest of the string (including
any further '!' characters). I believe this matches much more how people
use it. For instance I certainly store all my local tags with no '!' in
them.
Bill Spitzak
Rhythm & Hues
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf