How often is swift used on a non-Apple platform? Also why?
How often is swift used on a non-Apple platform? Also why?
Then, there's a big push for Swift+Tensorflow and other ML. The hope here appears to be the ability to implement "automatic differentiation" (or was it "integration"?). I don't remember enough math to fully understand, let alone try to explain that. But I can attest that even without being implemented, it has the power to get ML people salivating.
https://www.infoq.com/news/2020/01/ibm-stop-work-swift-serve...
Though the way all of those work is substantially different. Swift doesn't monomorphize generics like Rust does[0], for example.
Swift doesn't have a concurrency story yet, so it is possible to have data races if you share data between threads. An ownership system[1] is in the works, but it is not complete yet.
[0]https://www.reddit.com/r/rust/comments/7gkiie/implementing_s... [1]https://github.com/apple/swift/blob/master/docs/OwnershipMan...
Protocols are fairly close to traits, and I much prefer that approach (and Scala's traits), to traditional OOP.
Swift can monomorphize generics, but it doesn't do so by default. Normally this is left up to the compiler, but it's possible to force monomorphization using inlining attributes.