-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update generics overview #3061
Update generics overview #3061
Conversation
docs/design/generics/overview.md
Outdated
A function can have a mix of checked, template, and regular parameters. A | ||
checked parameter is defined using a symbolic binding pattern, a template | ||
parameter using a template binding pattern, and a regular parameter using a | ||
runtime binding pattern. Likewise, it's allowed to pass a symbolic or template |
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.
A function can have a mix of checked, template, and regular parameters. A | |
checked parameter is defined using a symbolic binding pattern, a template | |
parameter using a template binding pattern, and a regular parameter using a | |
runtime binding pattern. Likewise, it's allowed to pass a symbolic or template | |
A function can have a mix of checked, template, and regular parameters. A | |
checked parameter is defined using a symbolic binding pattern, a template | |
parameter is defined using a template binding pattern, and a regular parameter is defined using a | |
runtime binding pattern. Likewise, it's allowed to pass a symbolic or template |
I originally read this as
A checked parameter is defined using (a symbolic binding pattern, a template parameter using a template binding pattern, and a regular parameter using a runtime binding pattern).
Alternatively, I think something like this could work:
Each kind of parameter is defined using a different syntax: a checked parameter is uses a symbolic binding pattern, a template parameter uses a template binding pattern, and a regular parameter uses a runtime binding pattern.
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.
I used the alternative, but also noticed I needed to update the next sentence.
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This reflects changes from a number of approved proposals:
type
#2360 : "type", "facet type", "facet". Note: I am not using the term "generic type" from Types are values of typetype
#2360 since that meaning conflicts with the generally accepted meaning of "generic type" of a type with a compile-time parameter.class
andinterface
syntax #2760 / Terminology for internal and external implementations #2770 : internal/external impl -> extending impl