Skip to content

Clarification: same bare and quotted keys sematically equivalent? #733

@tperami

Description

@tperami

The question is simple: Do a and "a" refer to the same semantic key?

For example, is that forbidden?

a = 4
"a" = 5

My interpretation of the specification is that a and "a" are the same semantic key. It is what makes the most sense for me. However the implementation I use in Ocaml, To.ml, make them semantically separate. They have either KeyBare of string or KeyDotted of string (That's a sum type for those that do not know Ocaml) and so bare key and dotted keys can never overlap. Did I misunderstood or should I raise an issue on their side.

Furthermore, once this is clarified here, I strongly suggest you make it explicit in the standard because even if I read it one way on my first read, I have to admit I cannot prove that the other interpretation is wrong with the current specification text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions