4 ms·
I am fascinated by how the general community perceives swift. The PL theory community seems to appreciate its innovations, while the (online) dev community sees
by hazn 4y ago
I am fascinated by how the general community perceives swift. The PL theory community seems to appreciate its innovations, while the (online) dev community sees it as Apple's own C#.
Ultimately, I think Swift is a hugely underrated language, mainly because of outdated criticism.
- pjmlp 4y agoWell, the fact is that it is as open source as Objective-C, and that it has hardly helped the latter without the frameworks that really matter. 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.
- johnthuss 4y agoI don't think this is true. Apple provides a fairly substantial standard library along with the open source version of Swift, which they never did for Objective-C.
- pjmlp 4y agoWe have very different point of views what fairly substantial means, specially in absence of any Apple ecosystem key framework and XCode tooling.
- ofrzeta 4y agoOpen Source Swift will never become a language for graphical applications. Same problem as with Objective-C as you said. There's GNUstep but look how far they have come in decades. On the other hand a bunch of useful libs (based on said standard lib) for server-side Swift is realistic.
- pjmlp 4y agoServer side Swift lags behind the competition and only makes sense for Apple shops to write their apps backends.
- bsaul 4y agoEven for apple shops, it doesn’t really makes sense. It is a myth to think that you can share anything of value between client and servers, except dumb data types that you’ll probably want to define in protobuf anyway for various reasons. 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.
- pjmlp 4y agoApparently a myth made reality on the Apple shops I know. 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.
- bsaul 4y agoI'm really curious to know what code they actually managed to share between client and server. 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".
- ofrzeta 4y agoDifferent ecosystem but we share Typescript type definitions between frontend and backend. That's not so bad.
- pjmlp 4y agoData models, validation code, business logic that needs to be done on both sides, dynamic UIs. And about protobufs, I am yet to see any production deployment using it.
- d3nj4l 4y ago> The PL theory community seems to appreciate its innovations 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!)
- favorited 4y agoThe Swift story around ABI stability and library evolution is pretty unique. Relatedly, its approach to generics doesn't fall into either of the 2 traditional paths (either box everything like Java and C#, or template instantiation like C++ or Rust). https://faultlore.com/blah/swift-abi/ https://faultlore.com/blah/swift-abi/ https://www.youtube.com/watch?v=ctS8FzqcRug https://www.youtube.com/watch?v=ctS8FzqcRug
- cwzwarich 4y agoThe closest thing to Swift’s approach to polymorphism in the academic world is intensional polymorphism: https://www.cs.cmu.edu/~rwh/papers/intensional/popl95.pdf https://www.cs.cmu.edu/~rwh/papers/intensional/popl95.pdf
- hazn 4y agoHow Swift Achieved Dynamic Linking Where Rust Couldn't: https://faultlore.com/blah/swift-abi/ https://faultlore.com/blah/swift-abi/ Many programming languages list Swift as inspiration: https://www.val-lang.dev/ https://www.val-lang.dev/ Rust's optional bindings are inspired by swift: https://doc.rust-lang.org/reference/influences.html 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.
- deleted 4y ago[deleted]
- kaba0 4y ago> The PL theory community seems to appreciate its innovations 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