-
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
Terminology for internal and external implementations #2770
Comments
I think we should change to match. "extended implementations" and "implementations" would be my initial suggestions. There is a question of how important it is to have a dedicated or positive term for the non-extended case? |
The non-extended case has different rules, for example:
|
Yes, but that alone doesn't make it clear to me how important it is to have a dedicated term? I'm guessing you're trying to say that it is somewhat important, but I'm still not sure where that leaves things. I also don't have any ideas for what the term should be here, but if you or others do, then maybe its a moot point. Unrelated minor question:
Isn't this just conditional blanket implementations? I may be getting confused though. |
We don't say "conditional blanket implementations" since it is redundant, all blanket implementations are of the form "for all types satisfying a criteria..." |
I'd avoid introducing a separate term for non-extended impls. I think your examples both become clearer if we phrase them in terms of where you're allowed to write
I'd say "you can't extend a blanket impl".
This one feels kind of obvious given #995, so we might not need to state it at all. But if it comes up, I'd say something like "you can't use In general, to get the maxmium benefit from #995, I think we should try to treat |
I find this argument compelling. |
I'm in an airport with two leads, and we agree with the resolution and rationale from #2770 (comment) |
Update syntax of `class` and `interface` definitions to be more consistent. Constructs that add names to the class or interface from another definition are always prefixed by the `extend` keyword. Implements the decisions in: - [#995: Generics external impl versus extends](#995), - [#1159: adaptor versus adapter may be harder to spell than we'd like](#1159), - [#2580: How should Carbon handle conditionally implemented internal interfaces](#2580), and - [#2770: Terminology for internal and external implementations](#2770). Co-authored-by: Richard Smith <[email protected]>
This reflects changes from a number of approved proposals: - #920 : concrete statements about orphan and overlap in Carbon - #2138 : "generic" -> "checked generic", "template" -> "template generic" - #2188 : binding patterns are forbidden in type position - #2360 : "type", "facet type", "facet". Note: I am not using the term "generic type" from #2360 since that meaning conflicts with the generally accepted meaning of "generic type" of a type with a compile-time parameter. - #2760 / #2770 : internal/external impl -> extending impl - #2964 : "symbolic constant" and "template constant" --------- Co-authored-by: Geoff Romer <[email protected]> Co-authored-by: Richard Smith <[email protected]>
This reflects changes from a number of approved proposals: - #2138 : "generic" -> "checked generic", "template" -> "template generic" - #2360 : "type", "facet type", "facet". Note: I am not using the term "generic type" from #2360 since that meaning conflicts with the generally accepted meaning of "generic type" of a type with a compile-time parameter. - #2760 / #2770 : internal/external impl -> extending impl - #2964 : "symbolic constant" and "template constant" --------- Co-authored-by: Richard Smith <[email protected]>
The decision #995 retires the keyword
external
to mark external implementations, and instead usesextend
to mark internal implementations. Should we change the terminology in the documentation to match? If so, what terminology should we use instead?The text was updated successfully, but these errors were encountered: