Ultimately, I think Swift is a hugely underrated language, mainly because of outdated criticism.
Ultimately, I think Swift is a hugely underrated language, mainly because of outdated criticism.
There is no issue in being Apple's C#, this is the only way for bringing safety computing forward, having the platform owner making it happen no matter what.
On the other hand a bunch of useful libs (based on said standard lib) for server-side Swift is realistic.
As for knowing the language, you’d gain the two weeks it takes to learn go, but you’ll loose all the ecosystem of quality libraries.
It is no different from the Android shops using Java and Kotlin for the backend, the only difference being the plethora of options on the JVM ecosystem that they can reach out outside Android.
I've been doing fullstack mobile / server dev for 12 years now and i've never ever told myself "what a waste, if only i could reuse this piece of code on/from the server".
And about protobufs, I am yet to see any production deployment using it.
We all live in bubbles. I've seen it, a lot; that's not proof that everybody does it. And the converse is true as well.
I'm curious as to what these innovations are. I've not looked too deeply into Swift - I've played around with SwiftUI a bit and nothing else - but from what I saw I didn't see any fundamentally novel ways to do things. People talk about protocols/actors etc, but I've seen other languages that do those and (IMO) better. If anything, I thought the emphasis on creating new forms of syntax for things that should've been built as more fundamental, orthogonal concepts (eg. `guard let` etc.) would've made it more distasteful to the PL theory crowd, who love orthogonality IME.
(I'm sorry if I'm coming off as sarcastic/combative, I'm genuinely curious about this!)
Many programming languages list Swift as inspiration: https://www.val-lang.dev/
Rust's optional bindings are inspired by swift: https://doc.rust-lang.org/reference/influences.html (Many people who worked on Rust also worked on Swift, like the creator of rust)
The SwiftUI framework you mentioned uses inspiring syntax, which has been tried do be emulated (Jetpack Compose, Druid). However, nobody got it as magical as Swift did. The way SwiftUI Syntax combines pl theory and developer usability is amazing.
The point on ABI compat is interesting - I guess that's the sort of thing that makes Swift truly an "end to end" language. Though at the same time, the focus on dynamic linking is a source of one common complaint with swift, IIRC - people often complain that the language features they use are tied to OS versions.
> which has been tried do be emulated (Jetpack Compose, Druid). However, nobody got it as magical as Swift did.
That's interesting, too. I'm not a UI programmer by any means, and from what little I tried of SwiftUI and JP Compose (though I have written more server-side Kotlin and found it perfectly pleasant) I didn't see a significant difference. Do you have any further reading I can look into this further?
Dynamic linking in AOT compiled languages exists for decades, other priorities in other ecosystems.
Groovy DSL for Swing was one of the first languages with such approach.
However all in all, it is a great language for the Apple ecosystem.
There are a lot more aspects to dynamic linking than a binary possible / not possible.
I was with you till this line. SwiftUI was so half baked for several versions that it took them 3 years to get a respectable navigation API. SwiftUI is great but it still has rough edges.
But I feel neither did Swift get SwiftUI right, it is hacked on top of the language and would not be reimplementable strictly as a library.
Is that the case? The language started out interesting, but it took a turn for the worse and has become a kitchen-sink with every single feature from any language being found in it, but their interactions are simply not designed well. But what innovation did it have? I can’t think of any one feature that would be novel, as in no other mainstream language would have experimented with it.
That said, I think it really was a great language, and there is a sane subset that is still great, don’t want to start a flame war :D