Why Swift is iOS only language

I know.
We have Kiutra, Vapor, Perfect ... for service side programming.
We have Swift Tensorflow.

But still many people think Swift as a language for Apple platform.

I really love working with Swift and I want to see Swift become more widely used languages.
Why doesnt it actually happen?


There are some issues imho:

  • IDE just für macOS available
  • No windows compiler
  • Why should anyone switch from JavaEE to Swift. You wont start rewriting everything.
  • A lot of companies use languages like Java for every backend project. That makes it easier for developers to switch teams inside the company.

It will take a while. I guess swift will be more widespread in 5 years.

1 Like

I think it’s happening, it just takes time. IMHO Swift is still quite young by programming language standards.


Swift is supported on ZERO current linux distros.
If you count old versions it is supported on only one. And it's not even available to be installed directly from the package manager.


In addition, the standard library is extremely anemic. For things as simple as JSON parsing you need to import Apple libraries (3rd party from the point of view of Swift). Same for networking, concurrency and other basic things that you would need to build something usefull in other platforms. This is a huge red flag for people outside the Apple ecosystem.

1 Like

so.. no hope for swift?

Not without some serious non-Darwinian evolution...


I think it because of 3 pieces which are still missed:

  1. Module Stability.

  2. C++ interpolation.

  3. IDE and tools outside of macOS.

You can actually use Swift for other platforms. Have a look at https://www.elementscompiler.com/elements/silver/. There's IDE support for Mac and Windows, and you can develop for .NET, Java, Android, WebAssembly and more, all in Swift. It's free, too.

That looks rather than a reimplementation of Swift with a new compiler; something that may have its merits but also its own set of drawbacks (especially when there is no official language standard).

1 Like

I used Java for almost 15 years before switching to Swift and found Swift several orders of magnitude easier (and more fun) to use. Sure, the ecosystem is nowhere near what Java has and I don't expect Java developers to migrate to Swift anytime soon, but if you're building a back-end for a mobile app, I recommend you try server-side Swift first (instead of Java, Node, PHP, Ruby or whatever you've used in the past).

It is. Why is that a problem? There's not just one single C compiler world-wide, either...

Fwiw, with Elements you can use Swift on the Java platform (including the whole ecosystem, existing libraries, and all, and including Android). And you can can even mix with existing Java code, on the same project.

(You can also use the Java language, to target iOS, or other platforms, as well)

I totally agree. I used it for several private projects and I really liked it. Except the lag of datastructutes.

However a lot of backend projects run for years and will continue to do so. Most companies wont switch from Java to Swift because it is more tun. Buying everyone an mac and switching the companies standard requires more arguemnts than just fun, since it will consume a lot of money and time.

(Yes, i know, in theory you could use unix too.)

1 Like

It's a deliberately incompatible reimplementation. All of the collections are reference types, with an explicit notice that they aren't going to ever make them value types, because, the authors claim, there's no way to make a copy-on-write collection type efficient on JVM or .NET.

You can provide your own, if you so desire. Also, I would not call that a "language incompatibility", it's merely a type in the framework that is does not have the same API, that's not the language.

in the nicc of time


And Elements lets you target Linux natively, via .NET/Mono or via JVM — whichever API/platform you prefer... ;)

Potato potato. Code written for the normal, "reference" if you will, implementation of Swift might very well not run on this. Silver certainly doesn't enable you to "use Swift for other platforms" not supported by upstream, at best it allows you to write code that looks a lot like Swift.

Additionally, it's a commercial closed source product, so you should probably at least mention you work for them when advertising it.


@marc_hoffman Sorry, but Silver lost me at the first screenshot. The code in those screenshots looks like it was translated from Java/C# with no attention to Swift's design guidelines whatsoever. It it wasn't for the .swift extension, I would have never known they contained Swift code.