From: David Hopwood <david.hopwood@bl...>  20040909 02:57:28

T. Onoma wrote: > On Wednesday 08 September 2004 10:06 pm, David Hopwood wrote: > >>I agree with Clark here. The YAML data model is both theoretically elegant >>and maps really well to practical programming languages. For any other data >>model, it would also be possible to come up with examples that require a >>little indirection in order to make the example fit. > > But I'm specifically pointing out where it is NOT elegant, where it does'nt > map well. And your last statement it not true. Mathematics has completely > "modelled" _all_ "kinds". Relations, btw is one of them. A mapping, btw > again, is a kind of relations. Yes, the usual way to model a relation in mathematics is as a set of pairs  which is exactly how you've suggested to model it in YAML, and that works fine. I don't see the problem. >>There are similarly tricky issues whatever types are used as the basis: >>using different types just moves the trickiness around  for example from >>equality to function application or to testing whether a relation is a >>function (I've spent a long time thinking about this). > > But you don't need to think about it! YAML should be 100% typeless, 100% > semanticless! Only the formal structure matters. Semantics belongs to the > application. Tags are only tags, they are not types, they are hints for type. > YAML itself need know nothing what they mean at all or how they are > "equal". It is simply incorrect to say that equality does not need to be defined. Mathematical sets, functions, relations, multisets, multirelations, sequences, graphs, etc. all use equality in their definitions.  David Hopwood <david.nospam.hopwood@...> 