-
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
adaptor versus adapter may be harder to spell than we'd like #1159
Comments
As a reminder, here is the alternative considered in #731 :
--
Making both spellings valid seems like providing two ways of doing the same thing, and would still make trouble for |
Note, in third-party c++ code I can easily search, |
Ah yes, we got used to writing in American English. Dialogue and dialog sure caused a few debates. |
This comment was marked as outdated.
This comment was marked as outdated.
As far as I'm aware, this question still needs an answer. |
If we can come up with a good different keyword, I'm all for it. But I don't find any of the current ideas very compelling...
In the absence of (or until we find) a specific reasonable alternative keyword spelling, I think we should keep the current one. Matching the GoF spelling makes it nicely searchable, etc. It has a lot going for it outside the spelling confusion. |
We've been writing 'dialog & 'color' & 'initialize' and even 'gray' for colour. Adapter is a pretty well known convention for software. Basically anything Americanised. |
So far the best alternative I've been able to come up with is I think matching the GoF spelling is actually potentially a disadvantage here -- I expect that For what it's worth, I also wonder if we could avoid having a special keyword for this at all, and instead model an |
If we want a change, this seems more promising. Notably, it might let us use the much less ambiguous verb form:
This reads quite nicely. And we can neatly solve the extending use case leveraging the generalized
Two issues I see, both might be fixable with slightly different word choice:
But maybe there is a slightly different keyword here that we can use in the same fundamental structure and get a common and generalized pattern of syntax across adapters, bases, mixins, and interface impls. |
Just to be clear, not ignoring this. But it also doesn't seem reasonable to look around and see if there is a syntax available that simply doesn't force the tradeoff here. And I think getting this to be part of a fully regularized |
For what it's worth, ISO 14882, which, despite encouraged to use Oxford English spelling, is widely given to American spellings, nonetheless has a subclause spelled "Container adaptors" (and uses that spelling throughout). |
Discussed today in open discussion. |
In the context of #995, we've been discussing a different syntax: |
I don't think #995 addresses adapters directly, but #1159 (comment) proposes a resolution of this issue that is consistent with the resolution of #995. |
That seems to just be part of the solution, but I see that #995 doesn't really have the whole solution. Let's outline what a resolution here would look like:
Does that seem right? Rationale:
|
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]>
I find I am misspelling our
adapter
keyword asadaptor
at least half the time I type it, and I don't seem to be getting better at getting it right. I suspect I won't be the only one who has this problem, and that adapters will be uncommon enough that developers won't, ahem, adapt.Both spellings are correct in English, and while adapter is the more common spelling by quite a margin in the English-speaking world, it is suggested that
... and we mean the latter.
Should we do something about this? Some possibilities:
adapt
ornewtype
.(Note that I don't think switching to
adaptor
is really a consideration, despite it being my preferred spelling, because it's clearly the minority spelling.)The text was updated successfully, but these errors were encountered: