You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When a JSII interface has a name like IFoo, the generated .NET interface is named IIFoo #109
Not prefix with I anymore for interfaces that are NOT datatype (jsii already enforces that non-datatype interfaces have a name prefixed with the I). Only datatype interfaces should append an I.
After discussion with Romain at the bindings meeting, looks like the interfaces are here to stay. There is usecases of interfaces implementations that are allowed by the language. Removing them would be a deal breaker.
The current state of things is that data types support multiple inheritance, which implies supporting interfaces in dotnet. Have to check whether we can disallow multiple inheritance, which would render interfaces unnecessary.
Activity
assyadh commentedon Aug 12, 2019
After talking with Romain, we chose to:
Not prefix with I anymore for interfaces that are NOT datatype (
jsiialready enforces that non-datatype interfaces have a name prefixed with theI). Only datatype interfaces should append anI.eladb commentedon Aug 12, 2019
Do we really need interfaces for data types? I was under the impression that in .NET we can express these data types without interfaces.
assyadh commentedon Aug 12, 2019
See my comment here:
https://github.com/aws/jsii/blob/master/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts#L148
Right now for each interface we create the interface, the interface proxy and the interface datatype class (implementing the original interface).
In the case of a datatype (props), we could do with JUST the datatype, not implementing any interface.
Relates: #480
Given that props objects are datatypes, they would live by themselves.
eladb commentedon Aug 13, 2019
So if I understand correctly the answer is that we can get rid of interfaces for data types (formally known as “structs”). Correct?
assyadh commentedon Aug 13, 2019
Yes
fulghum commentedon Aug 13, 2019
@assyadh – so the work for this task now, is just to remove the generation of interfaces for struct/data classes?
assyadh commentedon Aug 13, 2019
After discussion with Romain at the bindings meeting, looks like the interfaces are here to stay. There is usecases of interfaces implementations that are allowed by the language. Removing them would be a deal breaker.
I'll let @RomainMuller chime in on the specifics.
RomainMuller commentedon Aug 13, 2019
The current state of things is that data types support multiple inheritance, which implies supporting interfaces in
dotnet. Have to check whether we can disallow multiple inheritance, which would render interfaces unnecessary.assyadh commentedon Aug 20, 2019
After discussion with @RomainMuller , we can remove the added I in the interfaces as it JSII is already enforcing the I for an interface.
feat(dotnet): drop the useless I prefix for non datatype interfaces (#…