← Back to context

Comment by saagarjha

6 years ago

All of macOS's system libraries are dynamically linked, so there's just no way Swift could be used in the OS if it didn't do this right.

They're C libraries, there's very few languages which can't dynamically link to C. The essay is about Swift dynamically linking to Swift directly (not through a C ABI as e.g. C++ or Rust would).

The last part of the line reads (rather politically incorrectly) that Apple has more talent available to solve this problem.

  • Or they were just willing to accept a significant increase in language complexity, to deal with things that Rust just punts on by basically expecting you to stick to #[repr(C)] at your preferred dylib boundary. (Though, potentially, that #[repr(C)] could become e.g. #[repr(SomeArbitraryStableABI)], and there have been proposals to this effect.) And they did this precisely because of that perception that Swift "wouldn't be usable" otherwise.

  • Resources != Talent, and the line talked about resources, not talent.

    It's pretty obvious that Apple can throw more money at the problem than Mozilla can, if they choose to do so. That means they can buy more developers to work the problem, which is bound to be helpful whether those developers are particularly talented or not.

    There's really nothing politically incorrect about that.

  • Given that the author is a Mozilla employee (working on Rust) and former Apple one (on Swift), I'd be surprised if your interpretation was correct.

    • Yeah motivation is the bigger factor (why would Mozilla care about the system APIs of an OS, of all things?) but also it doesn't hurt that Apple is one of the richest companies in the world (depending on the day).

    • I do admit that English is not my first language...but I am struggling to interpret "Apple had way more resources to throw at this very hard problem." any other way.

      3 replies →

    • Or maybe it's just the hard truth (which wouldn't be surprising considering the valuation of Apple and Mozilla respectively)