-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
add ref-return-scope table #3607
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
9e98537
to
095f897
Compare
Is there a good reason why these permutations even exist? |
A table is good but much better is to enforce a canonical order for each semantic expressible |
Legacy code compatibility.
Possibly true, but who wants to update all their code? |
iirc the eventual plan is to require that I think the best way to explain this stuff is to start with just Happy to take a crack at writing some documentation for this myself if desired. |
This PR is documenting the way D behaves now. Initiatives to improve the language should be a separate discussion. The table expresses the meaning better than the prose did. |
e55e83e
to
d405df2
Compare
spec/function.dd
Outdated
$(TABLE2 Combinations of `ref` $(COMMA) `return` and `scope`, | ||
$(THEAD Order, Interpretation) | ||
$(TROW `ref`, $(REFP)) | ||
$(TROW `return`, `return`) |
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.
return
is not an interpretation
$(TROW `return`, `return`) | |
$(TROW `return`, $(RETURN_SCOPE)) |
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.
It depends on the context. See mtype.buildScopeRef
Co-authored-by: Petar Kirov <[email protected]>
5d6ba5e
to
46753fc
Compare
Well once we have language editions this can be done. It's otherwise a great plan IMO, but has one problem. How would |
The table with all the permutations should help.