by melling · 7y ago · 0 comments
There is some support on GNU/Linux, almost non-existant in other platforms.
However what makes a programming language is not only syntax and semantics, but libraries, IDE, tooling in general, and those are pretty much only available on Apple platforms.
There is nothing like CoreData, CoreAudio, SceneKit, Cocoa,.... outside Apple platforms for Swift.
Swift is already more widely used than Objective-C outside of Apple platforms. The main difference is that the Objective-C runtime (which is required to make Objective-C useful in any meaningful way) is closed-source and not available on non-apple platforms. The Swift runtime is available and officially supported on Ubuntu.
> There is nothing like CoreData, CoreAudio, SceneKit, Cocoa,.... outside Apple platforms for Swift.
Most of those examples are proprietary frameworks for interfacing with the Apple platforms directly. Most major platforms include proprietary frameworks, and their existence as value-adds on that platform don't speak to a detriment of the language as a whole. Your statement is like saying C++ is not useful outside of Windows because there is no DirectX.
There is already a large body of open source libraries for Swift for a variety of tasks, and moreover Swift's excellent C interoperability makes it very reasonable to make serious platform-agnostic software with Swift.
Which is actually the only OS outside Apple platforms that has any kind of proper support for Swift.
> Your statement is like saying C++ is not useful outside of Windows because there is no DirectX.
C++ is usefull outside Windows, because it is an ISO standard in no means bound to Windows, with several OS vendors and OEM contributing for multiple implementations of the said standard.
> There is already a large body of open source libraries for Swift for a variety of tasks, and moreover Swift's excellent C interoperability makes it very reasonable to make serious platform-agnostic software with Swift.
Quantity does not mean usefulness.
Great interoperability with C isn't exclusive to Swift, and is also available in languages with a bigger markeshare, with implementations across several OSes.
Swift is great as replacement for Objective-C, improving the safety on Apple's platforms and making FP mainstream on those platforms, as cross platform language it still has quite a lot to improve.
I agree with you that Swift has a way to go before it can be considered a truly platform agnostic general purpose programming language, but it is making strides in that direction. Recently Windows nightly builds have been introduced, and work has started on Language Server Portocl support, which should aid usability on 3rd part IDE’s. Also it’s somewhat perplexing to me that Swift for Tensorflow is often viewed as a strange move under the assumption that Swift is only for iOS, rather than being viewed in terms of Swift’s adoption for a new category of use-cases with the backing of a tech giant in Google.
It remains to be seen whether Swift will find wide adoption, but I think it’s a mistake to assume it won’t only because of its origins.
I would not say that's exactly true. There are a number of projects shipping server-side swift, and there is some nice tooling for using Swift where you might otherwise use a scripting language. Personally I reach for it more and more for projects outside of mobile, and find that the non-iOS ecosystem has grown to feel very functional in the past couple years.
iOS is undoubtedly still the main use-case for Swift, but plenty of people are using it for other things.
But to add to my point... unfortunately, none of those are in the realm of numerical computation or anything remotely connected to the Tensorflow domain.
If a Tensorflow user needed to interact with the ecosystem, it would seem that there's not much in place because the folks currently in the Swift community don't work in those fields, whereas Julia folks do. It's not just C interop, but the presence of mature dataframe libraries, a linear algebra layer (that doesn't involve direct calls to BLAS or Lapack), etc.
Now that is not to say that with Google's backing, the community won't shift, but that will take time and uptake is uncertain, whereas with Julia that community alignment already exists.
And the Julia community didn't start out being platform-centric, so it has a broader base. I use Windows at work (because bigcorp) and there's currently no officially sanctioned Swift I can install, but there's an official Julia binary.
Again, not to put Swift down. It's just a very curious choice for Tensorflow is all.
IBM helps with Kitura, but I am yet to see some real project worthy of news headlines deployed with Kitura.
"In the end, we narrowed the list based on technical merits down to Swift, Rust, C++, and potentially Julia. We next excluded C++ and Rust due to usability concerns, and picked Swift over Julia because Swift has a much larger community, is syntactically closer to Python, and because we were more familiar with its internal implementation details - which allowed us to implement a prototype much faster."
However, the Swift community is larger only because it is used on iOS for non-numerical computation applications completely unrelated to Tensorflow. If we draw the lines of community around people who are in Tensorflow-related fields (i.e. numerical computation), I suspect the size of the Julia community is actually larger than Swift's.
I've been a Pythonista for a decade and a half, but in this case, Julia seems to me to be the more logical pick, given that it is designed for numerical computation (it is the modern successor to Fortran). Julia is syntactically closer to Matlab, which is a language familiar to many grad students, a pool from which many future Tensorflow users are mined.
The last point is valid though. Still, as someone with a numerical computation background, Swift remains a curious choice.
Maybe it's because I come from a C/C++ background, but declaring a few weak references here and there never felt like much of a hindrance to me.
* You're always thinking of whether you might need to use weak refs, right? That's a cognitive load that you would otherwise be spared.
* What are the consequences when you get it wrong?
* How probable is a mistake, particularly when working with a large complex codebase that you didn't create, and don't fully understand?
* How probable is it that you might fail to detect a mistake, for a long time?