5 ms·
I have heard great things about Swift but haven't spent a second looking into it because I assumed it's an Apple exclusive language - making it unsuitable for m
by apatheticonion 4y ago
I have heard great things about Swift but haven't spent a second looking into it because I assumed it's an Apple exclusive language - making it unsuitable for my use case of services deployed on Linux, developed from any OS.
To what extent, if any, is Swift exclusive to Apple devices?
- zyang 4y agoSwift is backed by LLVM and Linux solid is pretty solid. The cross platform problem has always been the core libraries. Fortunately a pure Swift core foundation rewrite is underway. https://www.swift.org/blog/future-of-foundation/ https://www.swift.org/blog/future-of-foundation/
- jeroenhd 4y agoLooks like I may eventually give Swift a try once the rewrite is done! I've been watching Swift for a while now but I don't have a Mac so I haven't had a reason to try it. Do you happen to have any idea about UI library support? Will UI still be Apple only?
- charrondev 4y agoAs far as I know all of the UI stuff is dependant on iOS and macOS specific libraries. Apples UIKit and AppKit libraries are still proprietary here (and even have completely different capabilities depending on your platform and OS version).
- MBCook 4y agoI see no reason for Apple to ever make the UI stuff available on other platforms, I can’t see how that would benefit them. But there’s nothing stopping other UI libraries from making Swift bindings.
- photonbucket 4y agoApple surely must run a lot of linux machines internally, I imagine it would be nice for them to have internal services written in swift
- MBCook 4y agoThat’s my understanding of why it’s on Linux (besides the community). Apple uses tons of Linux servers, cloud and DC. Swift means they can write high performance networking stuff with memory safety and modern features in a language/library they already use internally instead of using yet another new language (or losing safety with C/C++/Obj-C). Makes a lot of sense to me.
- giantrobot 4y agoMost of the Linux machines inside Apple are tucked away in data centers, they're not sitting on engineers' desks (there's always exceptions). The people writing stuff that will run on Linux are usually writing in languages that are already cross platform. The stuff running on Linux inside Apple has a pretty good chance of being Java or Python (or Ruby for some teams). These languages are usually chosen for their ecosystem. There's not much of a Swift ecosystem except the proprietary one on macOS and iOS. Without all the frameworks available on macOS there's not a huge Swift ecosystem to leverage.
- crispyalmond 4y agoTokamak[0] is really promising on this front [0] https://github.com/TokamakUI/Tokamak https://github.com/TokamakUI/Tokamak
- Klonoar 4y agoIt's not out of the question for someone to write a (e.g) GTK-backed SwiftUI API library.
- ChrisMarshallNY 4y agoI'd say that it isn't particularly useful, outside of the Apple ecosystem, but I do know that there has been Linux, and even Windows, support. In my case, I don't really care, as I program Apple native. I think it's an excellent language. I enjoy writing in it. I write Swift, every day.
- thayne 4y agoConversely, I don't really care about swift because it isn't particularly useful outside of the apple ecosystem.
- ChrisMarshallNY 4y agoExactly. I wasn't trying to be dismissive. It's just the way things are. Some people loathe everything Apple. They Just. Hate. Apple. I've been dealing with that for over thirty years. Some people hate me, for no reason, other than I write code for Apple devices. I don't hate anyone else, but I've tried programming a number of systems, and haven't enjoyed it as much, as I do, working with Apple's stuff.
- stalfosknight 4y agoIt’s open source under the Apache license. It has support for Windows, Linux, and Android too.
- zokier 4y agoAt one point IBM attempted to make swift viable on the sever-side: https://news.ycombinator.com/item?id=21808619 https://news.ycombinator.com/item?id=21808619
- myko 4y agoKitura is no longer maintained but one of its primary competitors is still going strong: https://vapor.codes/ https://vapor.codes/
- klodolph 4y agoIt's Apple-exclusive in the same way that C# is Windows-exclusive or Go is Linux-exclusive. You'll have a much better time programming C# on Windows or Swift on macOS, because that's where all the best tooling is. The tools and libraries are open-source, cross-platform, and mostly maintained by one company.
- chabad360 4y agoThat's really not the case with C# or Go. C# has first class Linux support nowadays (minus GUI support) and using Go on windows is quite easy (I daily drive go on windows at work).
- maldev 4y agoWith Maui, you can now have first class Linux gui support, same with Blazor. You can also even do some of the more cutting edge stuff on linux like compiling straight to ASM.
- KRAKRISMOTT 4y agoAre you sure Maui provides native Linux GUI support? (Not through a WebView)
- lockhouse 4y ago.NET MAUI doesn't have first class Linux GUI support. Unless you count Android as Linux. [1] There were some unofficial efforts for Linux GUI support for MAUI's predecessor (Xamarin Forms), but never first party support. [1] https://learn.microsoft.com/en-us/dotnet/maui/supported-platforms?view=net-maui-7.0 https://learn.microsoft.com/en-us/dotnet/maui/supported-plat...
- mpawelski 4y agoMAUI is not working on Linux, still Microsoft market it as "cross-platform" which is super misleading at best (and pure lie at worst).
- 4y ago
- andsoitis 4y agoNot exclusive to Apple devices at all. More details about platform support: https://www.swift.org/platform-support/ https://www.swift.org/platform-support/ (tl;dr Apple platforms, Linux, Windows)
- alfor 4y agoI think that Apple control where the language goes. That mean that things will serve other use cases only accidentally. fast.ai was very interested in Swift but dropped that project for that reason.
- likeabbas 4y agoI wish fast.ai would have succeeded with Swift. The world desperately needs the ML community to move on from Python and towards a fast, statically typed language with truly concurrent multi threading.
- alfor 4y agoHaving a common stack that is fast and coherent from the highest to the lowest level would be wonderful. But it seems it’s what make Python successful: it force a interface between the low level serious stuff and the configuration/use at higher level.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]