Clarify that key comparison is ordinal#993
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
27cc1d4 to
7cee7df
Compare
Use the phrase "quoted keys", because currently none of this applies to unquoted/bare keys .
|
I rebased this on the current main, and added a few small changes. See commit log. This fits with #1095: "TOML tables are intended to map to hash tables or dictionaries, as a consequence empty quoted keys are allowed". I think we can merge it? Pretty much all of the above discussion went on about what to do about normalisation in the context of unicode bare keys, and the PR got stuck on that. That is currently not relevant, and was arguably it was off-topic in the first place. I've hidden all comments as "off topic". What we do or don't want to do with regard with normalisation for Unicode bare keys can be discussed (again...) once we add something for that to TOML again. |
SnoopJ
left a comment
There was a problem hiding this comment.
I still have no authority, but I also still approve of this changeset. The example here is reasonably illustrative and the note that this is DISCOURAGED is good to have.
|
May want to add a "TOML tables are intended to map to hash tables or dictionaries, as a consequence [..]" line here by the way, similar to #1095. I'll see what comes out of that proposal before adding it here. |
@SnoopJ identified in #966 that the TOML spec does not specify how keys are compared. We've discussed the matter to death at this point, and if I never hear the word "normalization" again it'll be too soon 😅, but to recap:
So I'm taking @eksortso's proposal in his comment in #966 and running with it. This is not intended to complete with @arp242's #990 - they're orthogonal, really. Regardless of what we decide RE normalization (or lack thereof), we should say something about how keys are treated during comparison.
This also somewhat strengthens the idea that keys are just strings. Since they can be specified using string syntax, there's really no argument to be made for treating them as anything else anyway, IMO. TOML isn't a programming language.
Closes #966