-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use qualified type reference YAML::Any
#12688
Conversation
What's the problem? I don't see any inaccuracy. |
newbie user for use YAML.parse don't know what is the Analysis from another angle, if you want return a JSON::Any from some convert methods defined in YAML, what is the Any stand for? |
You can click Any and you will know. |
I mean, if you want the fully qualified name then it's a doc generator change. But types lookup in code works the same as in docs. If you know one you should understand the other. |
@asterite, although titled as document improvement, but that not the only reason:
|
Writing out the fully qualified name of every constant adds a lot of clutter and makes the code hard to read. In the context of
Even a fully qualified name needs lookup of the name spaces for validation. I won't comment on any performance consideration of either variant because it's absolutely negligible. It doesn't make any difference. This is entirely a question of developer ergonomics, considerations of compiler performance must not affect that (b/c it doesn't matter). |
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.
This is bringing consistency in the code and docs. Thanks @zw963 !
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.
We talked about this issue and agreed that for the specific case of Any
it makes sense to use qualified names because it's easy to get confused about it.
YAML::Any
Current generated document not accurately.
this PR make those more accurately.