4 ms·
I can't really imagine Swift ever breaking out of Apple's walled garden. It's a pretty big garden, but the language concedes so much to Objective-C compatibilit
by ncmncm 7y ago
I can't really imagine Swift ever breaking out of Apple's walled garden. It's a pretty big garden, but the language concedes so much to Objective-C compatibility, it is hard to see any role for it where Objective-C never got a foothold.
Where am I wrong?
- OberstKrueger 7y agoIs this necessarily a bad thing? ObjC did fine as a mostly Apple-centric language. Swift is generally a lot nicer to use than ObjC, even if it wasn't a clean break from backwards compatibility.
- gnachman 7y agoOne of my projects is pure Swift and I haven’t felt any Objective-C-based pain. Mostly this is because it doesn’t have a UI. When you touch UIKit then the legacy stuff rears its head and you have to deal with selectors and NSObject and such. I think SwiftUI is supposed to be the answer to that. We ought to know whether it works out in a decade or so :). But as long as you’re looking for a general-purpose programming language, Swift is a good choice. The type system is excellent and makes a lot of things easier. I like ARC better than GC, which is the biggest selling point in my opinion.
- willyt 7y agoTo install swift on a raspberry pi: curl -s <https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh> https://packagecloud.io/install/repositories/swift-arm/relea... | sudo bash sudo apt-get install swift5=5.0.2-v0.4 [0] https://lickability.com/blog/swift-on-raspberry-pi/ https://lickability.com/blog/swift-on-raspberry-pi/
- wlesieutre 7y agoHN truncates long URLs, you’ll need to indent with spaces for a code block to show the whole thing
- willyt 7y agoProbably best just to follow the cite link and learn more about what you might be installing. Its a random blog post I found on the internet.
- skohan 7y ago> the language concedes so much to Objective-C compatibility Such as? Personally I've taken to using Swift basically in every use-case where I can, largely because it's so nice to work with. It strikes a very nice balance between productivity (lack of tedium) and strong compile-time guarantees of correctness. From my perspective, there are a few obstacles preventing Swift from achieving wide adoption: 1. Tooling and support outside Apple platforms has a long way to go. The story is better than it was even a year or two ago, but when compared to Rust, for example, Swift is massively lacking in this area. 2. Swift is still viewed as an iOS-only language. Even though there are now mature libraries for things like writing a webserver, and it's quite possible to write software for Linux using Swift, the developer perception is not there, and thus adoption is slow. This contributes to the lack of tooling and support. 3. Performance needs some improvement. ARC and copy-on-write are great for writing correct code easily, but they lead to some serious and sometimes unpredictable performance cliffs with Swift. There is a lot of low-hanging fruit here, but this needs to be addressed before Swift could ever find a place as a systems programming language for example. So I would not quite say I'm bullish with respect to Swift's chances of breaking out as a general purpose programming language, but objectively speaking I would say that all the problems preventing Swift reaching that state are solvable problems, and Objective-C compatibility has little to do with it.