5 ms·
There is more in that rationale than being privately owned. In comparison to C#, Swift is not natively adopted by any of the three big cloud providers (AWS, Azu
by oaiey 7y ago
There is more in that rationale than being privately owned. In comparison to C#, Swift is not natively adopted by any of the three big cloud providers (AWS, Azure and GCS) despite being the go-to language for half of all mobile apps (which is a huge market). C# is supported despite being Microsoft controlled. I believe that Swift does not have the confidence of the community due to Apple's radical technology choices.
IBM may have counter-balanced this.
What do other think is the reason for the slow backend adoption of Swift?
- Bigpet 7y ago> What do other think is the reason for the slow backend adoption of Swift? It's not different enough. All the demos I've seen of it, felt like it was mostly an "also ran" language that modernised it to be a significant improvement over Obj-C. But I've never seen any argument for it being a huge enough improvement over C#, Kotlin or others to be worth it to switch ecosystems.
- andybak 7y agoI feel differently. I read the docs when it was first released and felt it was potentially hitting the sweet spot for "static yet expressive" and "familiar yet modern". I was mainly Python at the time and the readability and clarity impressed me and those are areas where I have very high standards. More radical languages all tend to look a bit "read only" to me but I am aware that might just be unfamiliarity on my part. C# and Kotlin both have nice features but they are more conservative Java-likes than Swift. Swift had enough modern features and syntax to feel like it would be reward the effort learning. But I don't own an iOS device so I'm still waiting for a use case!
- pjmlp 7y ago.NET and JVM also have Clojure, Scala, F#, C++ to choose from, metaprogramming runtimes, and AOT compilation support (although many seem to forget about this one). So while Swift is a welcomed improvement over Objective-C, hardly brings anything worthwile to dump either the Java or .NET ecosystems.
- DeathArrow 7y agoAdd the fact that both JVM and NET are huge ecosystems with tons of libraries.
- ChrisMarshallNY 7y agoI use Swift to write for all Apple systems (iOS, Mac, Watch and TV). The only ones that are similar are iOS and TVOS, but there's a few differences in the way that you structure apps.
- lmm 7y ago> C# and Kotlin both have nice features but they are more conservative Java-likes than Swift. Swift had enough modern features and syntax to feel like it would be reward the effort learning. What does it have that Kotlin doesn't? (As a Scala programmer, Swift and Kotlin look pretty much the same to me; as far as I can see they're both polished but conservative languages that don't fundamentally offer anything that wasn't in OCaml)
- dep_b 7y agoThey're pretty similar on the surface but Kotlin is a bit hindered by it's Java legacy, generics are better in Swift (and for example C#) because of that. Swift has associated values with enums, Kotlin can assign a value to a variable with a when (switch) statement. Swift uses more pass by value, Kotlin does a lot more pass by reference. Kotlin has Java's form of garbage collection, Swift uses ARC. ARC is simpler to predict but can induce a performance penalty. I don't think Kotlin has any form of the "ugly C" API Swift has. Swift is a bit more secure in terms of "it compiles, it works" than Kotlin, but Kotlin is definitely a huge improvement over Java.
- lmm 7y ago> generics are better in Swift (and for example C#) because of that Disagree. Reified generics let you write functions that do different things based on the runtime type of an object, but such functions are confusing to a reader and best avoided. > Swift has associated values with enums Java/Kotlin style enums are my favourite from any language, since they're first-class objects; you can give them a value in a field if that's what you want, but you can also have them implement an interface etc. > ARC is simpler to predict but can induce a performance penalty. In the general case ARC has the same pause problems as traditional GC, since you can't tell when one reference is the last living reference to an arbitrarily large object graph. > Swift is a bit more secure in terms of "it compiles, it works" than Kotlin How so? If anything I'd have expected the opposite.
- saagarjha 7y agoEnumerations can satisfy protocol requirements in Swift; they're first class.
- DeathArrow 7y ago>C# and Kotlin both have nice features but they are more conservative Java-likes than Swift. Swift had enough modern features and syntax to feel like it would be reward the effort learning. What necessary modern features do you feel Swift has and C# doesn't?
- tinus_hn 7y agoIs there any kind of framework for backend use? I think that is a major factor in deciding what language to use.
- ChrisMarshallNY 7y agohttps://vapor.codes/ https://vapor.codes/ seems to be the most popular one. These guys are great: https://www.objc.io https://www.objc.io I'm pretty sure their site is a Vapor server.
- jfkebwjsbx 7y agoYou need to reverse the question: why would developers adopt Swift? C# was successful because at the time it appeared people wanted an alternative to Java.
- DeathArrow 7y agoC# seems like much better time investment if you want to target many platforms and areas. Now I do business web apps, but previously I did games. Which we published on all app stores + web. I'm also doing web sites. I did cross platform mobile apps with Xamarin. I can do even frontend web thanks to Blazor. I can use C# for embedded work - but that's not my thing. And you can use C# for machine learning, too. With Swift I would be restricted. Which may be fine for some people who like to work only on certain kind of apps, but not for me. Only Rust tempts me to learn and use as a new language.
- oaiey 7y agoFor me as a long-term C# fanboy these modern times are hard. C# has benefits now because of the community and wide reach. That was always the argument against C# ;)
- DeathArrow 7y agoI see it picking traction. Probably won't happen in Bay Area but smaller shops worldwide are picking it because it has some advantages. I don't expect it to takeover the world, I just want it to have enough success to keep me earning money and be kept up to date. Which kind of happens. :)
- zapnuk 7y agoIBM has close to no momentum behind their cloud offerings compared to the big three. I don't see how IBM will push for Swift in the future. They already pulled out (?) of the swift server working group, and didn't have the kind of pull to begin with. IMO the most important reasons for the slow adaptation is lacking cross platform functionality (currently no upstream windows support + poor linux tooling) and questionable API design. Both make it difficult for new developers to give swift a try. Luckily, windows supportis supposed to come with the next version in a few months. The API design is probably very subjective, but comparing the example in the blog post I don't understand how anyone could prefer: import Foundation CFAbsoluteTimeGetCurrent() over: import time time.time() The python way is much more intuitive IMO.
- jpttsn 7y agoTo play the devil’s advocate, I think time.time() is more vague than intuitive. What value does it have? 0? Current time? In what time zone? Is it monotonous?
- DeathArrow 7y ago>What do other think is the reason for the slow backend adoption of Swift? For web related work some other languages with their frameworks might yield better productivity: C#, PHP, Python, Java, Ruby. In latest web framework benchmarks by Techempower, Java, C#, Kotlin beat it by a large margin. It doesn't do very good against Java even in The Computer Language Benchmarks Game, where each wins in 5 tests.