-
Notifications
You must be signed in to change notification settings - Fork 85
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
Adding support for default interface function members #681
base: draft-v8
Are you sure you want to change the base?
Adding support for default interface function members #681
Conversation
Depending how PR #680 is resolved, some tweaks might be needed with this PR. As at 2024-01-11, that PR is still pending, and is tied to the review of this PR. |
84a1703
to
caba5c7
Compare
caba5c7
to
dc8d7a0
Compare
rebased on the latest draft-v8 on 09-23-2023 |
Should the references to "C# implementations targeting the CLI" be changed somehow because the ECMA standard CLI does not support default interface members? Possible answers include:
|
Enclosing a paragraph in brackets breaks the word converter. It looks for a link.
Re @KalleOlaviNiemitalo's concern about the Ecma CLI standard not supporting default interface function members, we previously made a related change to the draft-v8 Introduction, which in V7, said:
It now says:
I think that allows us to say nothing more for this feature with regard to the CLI. |
Re the MS proposal: The main challenge when reading it was the (misleading) occurrence of the modifier
override
in numerous examples and narrative. As best as I can tell, this modifier is not actually permitted on any interface member. Instead, overriding is achieved via explicit implementation.There is one open question, which has to do with the topic "Base Interface Invocations," for which the decision "Decided on
base(N.I1<T>).M(s)
" was made. However, as far as I can tell, support for this was not added to the V8 compiler. Can someone please confirm (or refute) that.BTW, I think the proposal is misnamed: it really applies to all interface function members (properties, indexers, and events as well), not just methods. (it also allows nested types.)
Note: No spec changes are needed to support entry point
Main
in an interface. Any non-generic type containing aMain
method withvoid
/int
return and no/onestring[]
parameter list is already permitted, which not only allowsMain
in a struct or class, but now also in an interface.As of V7, the descriptions of the various member kinds has been located in classes.md, with augmenting and/or overriding text in structs.md, with pointers from structs.md back into classes.md, and that continues. However, now that many members kinds can have implementations in interfaces as well, I've added an intro para to the start of most member sections in classes.md, which contains forward pointers to that member kind's occurrence in structs.md and interfaces.md, as appropriate.