4 ms·
I really wish that Apple would provide an alternative C API to its system frameworks, even if it would be inconvenient to use (similar to Microsoft's COM APIs -
by flohofwoe 3y ago
I really wish that Apple would provide an alternative C API to its system frameworks, even if it would be inconvenient to use (similar to Microsoft's COM APIs - terrible to use directly as C API, but at least it's possible, and most importantly, the COM APIs provide a stable ABI and allow proper interface versioning - so old and new interfaces can live side by side).
Language bindings could then directly go through the C API instead of having to go through an ObjC- or Swift-shim, or calling directly into the brittle ObjC runtime functions (is there even something similar to the ObjC runtime for Swift?, e.g. a C API to create Swift objects and call methods on them?).
- neonsunset 3y agoThey do! See https://github.com/apple/swift/blob/main/docs/LibraryEvolutionManifesto.md https://github.com/apple/swift/blob/main/docs/LibraryEvoluti... You can also see an example of what a .NET integration with Swift ABI looks like here: https://github.com/dotnet/designs/blob/main/proposed/swift-interop.md https://github.com/dotnet/designs/blob/main/proposed/swift-i...