Hello Everyone. Recently I was having discussions with @cipolleschi about some of the C++ language constructs they are looking at for their first pass at experimenting with C++-Interop. We saw quite a lot of inheritance with virtual functions, but in many of the cases these were purely abstract classes. Currently with C++-Interop we import the following:
struct P { virtual int f() const = 0; };
struct C : public P { virtual int f() const override; };
as
struct P {
init()
func f() -> Int32
}
struct C {
init()
func f() -> Int32
}
In this instance, since the parent class only has pure virtual methods with no member variables and no custom ctors/dtors, I could see how the parent could conceivable be imported as a protocol. So instead the following:
protocol P {
func f() -> Int32
}
struct C : P {
init()
func f() -> Int32
}
I would like to know if there are any strong technical or semantic reasons why this should not be the case?
Thanks