-
Notifications
You must be signed in to change notification settings - Fork 69
Clarifies text in schema extension example #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarifies text in schema extension example #135
Conversation
While correct, the schema extension example could be misinterpreted due to vocabulary used. For example, a new reader who missed the implicit zero based versioning, could misunderstand how version 1 appeared in updates. This change walks through the thinking behind the example, so that readers have less cognitive break even if they misread the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanations of each version change in lines 125-177 are helpful. However, lines 204-209 are incorrect. The specification tells how to assign version and sinceVersion attributes; I don't see how you conclude that an attribute is not required or about a default interpretation. Nor do I agree about adding sinceVersion to an initial version; it's just clutter that does not change the meaning.
Thanks for the feedback @donmendelson. I do think that there's something unclear hence me trying to straw man how to address it in the example. For example, about version, the way the spec is written hints there is an implicit version zero.
On
For example, when I am working in a typed language like Java, if a I don't completely agree that sporadic use of sinceVersion is cluttered, but I do see where you are coming from. Over time, I would expect it to feel opposite in some schema, ex that lack of sinceVersion is the anomoly that might break some people's mind leading to research to figure out when it was added. Lack of uniform use of sinceVersion creates this ambiguity. I feel what you are saying is that it is ok for that ambiguity to exist as the cure is worse than the disease, that intentionally suggesting if you are going to use sinceVersion.. always do that.. could make some people feel it is cluttered in initial phases of the schema. Fair enough. Anyway, if I have misunderstood the meaning further let me know. Happy to remove the section you mentioned, but I would also like to know what I don't know, as the point of this change was to help others not scratch their heads as I did. Sometimes as a spec writer we can know too much in other words. Cheers! |
PS I intentionally didn't want to change semantics, but perhaps a less extreme example could be to say something like.. if you use ^^ is probably the heart of my tension, which might be easier to unravel than my preceding ramble. Cheers! |
@@ -187,3 +200,6 @@ Third version - a field is added | |||
</message> | |||
</messageSchema> | |||
``` | |||
|
|||
Notice adding fields does not effect `sinceVersion` on the message that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main thing that's happening with this example is we are adding sinceVersion on a field contained by message lacking sinceVersion. I'm not sure if this was intentional design of the example, but it was behind my mind wondering about how helpful it is to know when a field was added, but not know when the message was added.
I can still remove this revision if it is considered distracting or should be on a different PR. let me know which way to go.
While correct, the schema extension example could be misinterpreted due
to vocabulary used. For example, a new reader who missed the implicit
zero based versioning, could misunderstand how version 1 appeared in
updates.
This change walks through the thinking behind the example, so that
readers have less cognitive break even if they misread the spec.