Movatterモバイル変換


[0]ホーム

URL:


Tuesday,March12,2019

Software-ICs, Binary Compatibility, and Objective-Swift

Marcel Weiher:

Swift recently achieved ABI stability, meaning that we can now ship Swift binaries without having to ship the correspondingSwift libraries. While it’s been a long time coming, it’s also great to have finally reached this point. However, itturns out that this doesnot mean you can reasonably ship binary Swift frameworks, for reasonsdescribed verywell by Peter Steinberger ofPSPDFKit and the good folks atinstabug.

To reach this not-quite-there-yet state took almost 5 years, which is pretty much the total time NeXT shipped their hardware, and it mirrors the state with C++, which is still not generally suitable for binary distribution of libraries. Objective-C didn’t have these problems, and as it turns out this is not a coincidence.

[…]

Swift is designed as a programming language, not as middleware with language features. Therefore its modularity features are an add-on to the language, and try to transport the full richness of that programming model. And Swift’s programming model is very rich.

[…]

Did I mention that Objective-C is middleware with language features?

Previously:

Update (2019-03-13):Peter Steinberger:

Given the above constraints, PSPDFKit will likely never fully move to Swift. First and foremost, we still have many clients with applications built in Objective-C. There’s rarely a good reason to do a rewrite of battle-tested code, and we cannot force our partners to rewrite just for the sake of rewriting. Secondly, moving to Swift would heavily limit our subclassing system — currently, developers can register almost any exposed class and offer a subclass that PSPDFKit will initialize internally in place of our default base class. But seeing as Swift classes can no longer be subclassed in Objective-C, these capabilities would be greatly restricted if we switched to Swift.

This limits us to using Swift internally — which is the worst kind of Swift usage.

1 CommentRSS ·Twitter


Matt B
March 13, 2019 12:11 PM

That is VERY fascinating... and part of the reason why I love Objective-C without fully knowing why.

Leave a Comment

  

Black Friday
Blog
Archives
Tag Cloud
Top Posts

Recently Updated
RSS Feed ·Comments
Mastodon ·Twitter
Apple News
Trackback

Support this site viaPatreon.

Try my Mac apps:

DropDMGDropDMGDropDMG
EagleFilerEagleFilerEagleFiler
SpamSieveSpamSieveSpamSieve
ToothFairyToothFairyToothFairy
Copyright © 2000–2025Michael Tsai.

[8]ページ先頭

©2009-2025 Movatter.jp