From: <ir...@ms...> - 2002-09-14 14:18:20
|
On Sat, Sep 14, 2002 at 10:50:45AM +0300, Oren Ben-Kiki wrote: > ir...@ms... [mailto:ir...@ms...] wrote: > > > You don't either. You use '- ' in front of the keys. Really. > > > Otherwise, declarations or no declarations, any YAML tool will feel > > > free to randomize them. > > > > But remember, "feel free" doesn't mean "has to". If you use > > only tools that promise to respect the order, you're safe. > > It's just, you can't expect *all* YAML tools to do this. > > If I can't run Perl's/Python's/Ruby's default YAML->load() on a document > without it ruining the document, it isn't YAML. So the above isn't. So what if a load() function parses both YAML and pseudo-YAML documents? I thought we were about making it easy for the user to do things "our" way, while also making it possible for them to do things we can reasonably accommodate; that's the whole reason we just added an access level with ordered keys in the first place. You can't prevent people from using YAML (or close-to-YAML) syntax without patenting the syntax, or lifting code without prohibiting derivitive works, or writing parsers that parse both YAML and pseudo-YAML documents without putting a NDA on the models. > > My crystal ball says there's a 99% that Steve's going to put > > a mode into > > PyYAML.load() that respects the order, 80% that he's not > > going to put dashes in front of his keys, and 50% that I'm > > not going to put dashes in front of my keys except when I > > need my ordered data to work with non-Howell tools. > > Oh _great_. So we'll have Howell's YAML vs. Oren's YAML? Shudder. No, we have one YAML defined in the spec. Extensions are extensions, and the important point is that extension implementors don't deceive users into thinking their extensions are standard YAML. But if users want to use the extensions and implementors want to support them, why not? We have other things to think about, like getting a wonderful model hierarchy finalized and amazing tools built. (Tools so stunning that users will be putting the dashes back in their documents so they can use them. :) -- -Mike (Iron) Orr, ir...@ms... (if mail problems: ms...@oz...) http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol |