From: TRANS <tra...@gm...> - 2006-06-08 00:20:23
|
On 6/7/06, Ingy dot Net <in...@tt...> wrote: > On 07/06/06 08:57 -0600, why the lucky stiff wrote: > > Well, so, I can't remember where we stand with the 'y' and 'n' booleans. Syck > > hasn't supported them because they conflict with other parts of the spec. (See > > examples 2.21 and 2.24 in either version.) > > > > Which of the following works? > > > > true: y > > false: n > > > > x: 73 > > y: 129 > > FWIW, I think the y/n boolean implicits are a little bit cute and could > be removed. > > But there are a few points I would like to remind people of: > > 1) The implicit type repository is not part of the spec. So it follows > that they have no relation to 1.1 or 1.2. > 2) The types are really a recommendation. Domain specific YAML > processors are free to define their own implicits. > 3) The default of a generic YAML processor should be to treat all > scalars as strings. > 4) A good generic processor should not only have an interface to > turn implicits on and off, but also to turn each specific > implicit on and off. That may be the official line but its far from the general use. the default of Syck is to use implicts and personally I think most people expect that. I agree though that ther should be an easy way to turn them off. I suspect just about every implementation will follow the same course, so I think the YAML tema needs to go a little further than a loose recommendation. Interoberability is a boon for YAML, so having a standard for common implict behavior would (IMHO) be a very good idea. Implementation can of course go beyond that (with ability to turn it one and off), but at least they'd have something to which to peg a base line of interoperability in this regard. T. |