From: Clark C. E. <cc...@cl...> - 2004-09-09 15:47:47
|
On Thu, Sep 09, 2004 at 02:35:09AM +0100, David Hopwood wrote: | - redefine equality as an operation that can produce three results: | equal, unequal, or unknown. The result is unknown iff it depends on | computing a canonical value for a scalar node with a tag that is not | recognized by the implementation. I like this change, it will also apply to ?unspecified tags which, by definition, are never recognized as they must be resolved. | (It is still possible for two scalar nodes with an unrecognized tag | to be reported as equal, if they have exactly the same string value.) Correct. | The value of a node includes its kind, so the definition of equality | does not depend on each tag being associated with a single kind. It doesn't hurt to be redundant, no? | Remove the definition of identity in 3.2.1.3. Whether nodes are | represented by the same native object has nothing to do with the | representation model or with equality; it's an implementation detail. It is there for two reasons: - as a contrast to 'equality', with which it is sometimes confused; and - to help determine which sorts of objects they should use, if their application requires that two 'nodes' with the same string value remain distinct, then they should use a collection (such as a sequence with exactly one value). Given YAML's purpose as a cross-language serialization tool, I think the latter point is quite important, no? Perhaps not. I'm not dead set against keeping it in. Cheers, Clark |