Note that i'm talking about the language here. The libs are of various quality. But powerful enums & switch + null safety + generics while retaining the ability to be learned easily by any "regular" developer makes it a category of its own.
My secret hope is that someone somewhere is working on a flutter equivalent coded in swift.
F#, Ocaml and Haskell come to mind.
I don't think there are any languages out there outside of Rust (which has it's own niche since Swift is ARC and Rust is more or less manual) that does the same.
F# should get a bit more love by Microsoft.
Plenty of GC books describe such algorithms, including the canonical "The Garbage Collection Handbook".
All the languages I referred do compile to native code as well. So you can also check the generated Assembly, just like with C.
They also do provide ways of doing C pointer style tricks, use value type allocations or manual memory management.
Then there is ATS and ML Kit as well.
As language greek I do like Swift, but it isn't really meaningful outside Apple's ecosystem.
Or are there any other reason, more technical ?
Microsoft always positioned it as "use F# for the hard stuff and C# for the rest." The trouble is that C# isn't that bad for the hard stuff, and if you're spending most of your time with C#, then for you it's probably better than F#.
When they made it officially part of .NET, it was the black swan of .NET languages with tooling only for libraries and command line applications.
Afterwards they attempted to position it as a language for ASP.NET MVC applications.
Then they largely left it for the community as F# was one of their very first FOSS projects.
Meanwhile the new MDIL compiler came out for Windows 8.x, followed by .NET Native, none of them support MSIL features required by F#.
Likewise .NET Core only accounted for C# and VB.NET, and they are still reimplementing type providers and the REPL for it.
Finally after all these years F# still lacks tooling for Forms, WPF and EF.
Meanwhile C# keeps getting some F# features.
Currently F# is being positioned as a language for data science with its type providers and Azure Netbooks.
And, it still has java underneath, which means everytime you're using a java lib, you have absolutely no idea what the null safety is going to be underneath (which is also the case with swift and objc libs, but which diminishes the attractivness of using the java libs ecosystem)
EDIT: also, value-based programming is highly encouraged by the full support for structs, either mutable or immutable. That's also a huge plus for safety against race conditions.
Also when the platform vendor makes changes, you have to wait for the cross platform solution to catch up.
Most of the iOS platform libraries are only available in Objective C and Swift.
Most of the Android platform libraries are only available in Java (or other JVM languages).
So, maybe you're just talking about desktop macOS in addition to phone apps?
Source for that claim?
Vapor has some pretty great benchmarks. https://medium.com/@codevapor/vapor-3-0-0-released-8356fa619...
So, when you cherry pick benchmarks, it can _look_ kind of fast... but then the unbiased TechEmpower benchmarks show Vapor operating at 20% of the speed of Gin. Which is 2% of the speed of the fastest Go or Rust web framework.
"50x faster to pick a different language" != "even remotely great performance."
(I have no personal interest in Swift on the server, I use Go/echo)
I did not look if other benchmarks were released but this is probably not the best representative.
I guess the key selling point is, well, being able to use Swift on the server (some people do like the language). It is pretty useful for sure. Certainly not the only choice.
That Swift is compatible with almost nothing on Linux sounds strange, not sure what you mean by that. E.g. I find it particularly nice for writing Apache modules (the Swift C integration is really neat).
P.S.: While Apple puts minimal effort in anything but macOS and iOS, others put significant effort into Swift on Linux. Like IBM.
Why not use Flutter? Even React Native is cross platform. Why are we still using a programming language for a phone app that means we have to write the darn thing twice? Even a RN webview pointing at an IP with code written in whatever-lang is seemingly a better choice.