From: Clark C . E. <cc...@cl...> - 2001-08-09 10:30:09
|
On Thu, Aug 09, 2001 at 12:07:32PM +0200, Oren Ben-Kiki wrote: | Clark C . Evans [mailto:cc...@cl...] wrote: | > Hmm. Lots of discussion here... and I'm pretty tired | > (been coding like a madman for my deadline today). | > I have a question. What is the difference between... | > | > 1. Every node has a type or class attribute. | > 2. Every node has a serialization indicator. | | Good question. However, in Brian and my proposal, a YAML | node does not have a serialization indicator. To remove | any doubt: to be YAML, all the data model must provide is | a simple map/list/string data model. Here are dem' facts: 1. We are a serialization language 2. Languges have data types 3. We need to serialize those data types 4. Different languages have different types 5. Some of the types from one langauge can be mapped to types to other languages. 6. Some of the types can't be mapped. 7. We want to be able to serialize objects (with a Class, aka type). 8. We want to be able to store these data types using a familar syntax, aka: Integer 34 Float 3.43 Currency $3.45 Date 2001-03-23 Tuple (3,4) So, we have two options: A. Fix the data types B. Allow for pretty much any data type If we want to be *the* readable serialization language, then we want (B). Thus, I say let's make our information model a "colored graph with unordered uniquely labeled / ordered unlabeled arrows" In short, the world isn't perfect. We are going to have to allow the storage of data types if we want to be a serializion language. So... we allow any data type, and we build a rich pluggable system for types and type mapping. So... a) We have implicit types via scalars that are indicator free and begin without an alphabetical character. b) We have explicit types via ! c) We have a rich warning system if implicit types go unrecognized. d) We provide explicit tools that enable round-tripping via schema, shadows, and via tools which directly support the YAML information model. What I don't want... A layered system, where people confuse the YAML lexer information model with the YAML parser information model. Layering information models does not work well... we learned this from XML. Best, Clark P.S. I'll get to your comments soon Oren. |