Chuck wrote:-- "2009-07-07 23:00:00" is not viable for dates because it's a string.
-- Not sure what you meant by incompatible format re: DateTime.parse. I'm sure it will take the ISO YYYY-MM-DD[T]HH:MM format inside the <> or ||.
I think with all the [code]s my post was a bit unclear. What i meant was that you can just write date: "2009-07-07 23:00:00" and then use DateTime.parse on it in your library-using code, or even define a custom Cobra type so that you can say date: !CobraDate "2009-07-07 23:00:00" and it'll parse it for you. Given the relative ease of doing these things, the incompatibilities added with a new data language would not be warranted.
In fact, now that I look at the YAML docs some more, it'd actually be possible (and easy) to add a new date format that is just <2009-07-07 23:00:00>, without the moderately ugly !CobraDate stuff, and do the same thing for colors and any other data type you want. See, for instance,
http://pyyaml.org/wiki/PyYAMLDocumentation#Constructorsrepresentersresolvers. I'm not certain that this is allowed by the YAML spec, but since PyYAML does it it's probably not horribly against the spec either.
Additionally, as I understand it, there aren't any full-featured YAML libraries for .NET, so writing one in Cobra and putting it out as a .dll would also make for some pretty good publicity - I'm sure thousands of developers would love a complete .NET YAML parser and emitter.
Chuck wrote:-- Re: YAML, well I love Cobra, so I'd like a Cobra-centric option for data. This doesn't remove the fact that there are 2 libraries for YAML on .NET plus the option of writing your own. Or using JSON.
Honestly, I don't see how this would be Cobra-centric beyond the fact that nobody using anything but Cobra would be able to read it without writing a custom parsing library. The differences from YAML seem to be far more along the lines of "things that are nice to have in a data language and YAML only supports moderately well" than "things that Cobra applications require, but other applications don't."