by chunkyguy · 3y ago · 0 comments
C++ `class Fern: public Plant` becomes two different types in Swift `struct Plant` and `struct Fern`, how is this supposed to help anyone?
https://www.swift.org/documentation/cxx-interop/#accessing-i...
The idea is that you should be able to use a derived object anywhere the base one is required.
Yes, it won’t be as ergonomic as the ideal, but it’s better than many binding solutions from C++ to compiled languages, while providing most of the usability.
Plus the footnote says that they plan to resolve this in future Swift versions.