3 ms·
> Swift has come a long way and my guess is Apple has either embedded it into their platforms or added some fancy tree shaking for the binary. It went ABI arou
by ChrisMarshallNY 3y ago
> Swift has come a long way and my guess is Apple has either embedded it into their platforms or added some fancy tree shaking for the binary.
It went ABI around Swift 5 or so.
I took a huge leap of faith, in 2014, and started using Swift, exclusively. It's turned out OK.
I'm not quite as positive about SwiftUI, though. I think it will work out, but it has a huge amount of catching up to do, if it is to replace UIKit/AppKit.
I'd be quite interested in Rich Siegel's take (the guy behind BBEdit). He's been at it, a while, as well.
- mromanuk 3y agoI've released a SwiftUI app, but was a nightmarish experience. They are experimenting and changing stuff to better serve SwiftUI philosophy, like the change from Combine to Observation. There were plenty of bugs and some of them difficult to debug like previewing screens on Xcode, sometimes it keeps crashing. When it works it's marvelous. I hope they can stabilize it.
- airstrike 3y agoYou can still use Combine in Swift, but I agree Observation in general feels inferior for all but the most mundane cases. It's like you go through a SwiftUI tutorial placing @Published and @ObservedObject everywhere, and then once you're writing the app you realize what you need is Combine except you haven't learned that yet
- imbnwa 3y agoI follow the development of Swiftcord, A SwiftUI Discord client, on the developer's discord, and they almost constantly lambast how much is apparently missing or unstable between AppKit and the current version of SwiftUI, which has made it a struggle to get to feature parity with the official Discord client based on Electron cause lots of things you expect either have to be implemented by hand or just can't be done IIRC.
- meindnoch 3y agoWhy do they insist on making their life harder? Just use Cocoa...
- lapcat 3y ago> I'd be quite interested in Rich Siegel's take (the guy behind BBEdit). He's been at it, a while, as well. Looking inside the BBEdit app, I see some Swift in BBEdit.app/Contents/Frameworks/CandiedYams.framework, which appears to be a third-party framework (CFBundleIdentifier org.darkrainfall.candied-yams), but not much else.
- ChrisMarshallNY 3y agoNot surprising. I've been using BBEdit for about thirty years. It's been through many changes. I suspect that he's pretty conservative.
- orenlindsey 3y agoSwiftUI is pretty good, I've been using to build an app. The big problem is navigation and state handling, it's not intuitive (although I never used AppKit or UIKit so I can't say if it's better or worse)
- jshier 3y agoYeah, you really need to combine SwiftUI with a dedicated architecture like PointFree's Swift Composable Architecture. It solves your state and navigation problems while adding dependency and testing solutions as well. Apple's stubborn and bizarrely proud insistence on not providing the full solution here is very annoying.
- bsaul 3y agojust had a look at Composable Architecture, and it looks like swiftUI being the equivalent of react, they faced the same problem and someone developed a redux in swift. Am i correct ?
- jshier 3y agoKind of, but without the reactive UI bits, since SwiftUI already provides that (they provide a way to publish state into the older frameworks as well). It's heavily inspired by Elm and React but doesn't match 1:1 with either.
- jimbokun 3y ago> The big problem is navigation and state handling Those seem like very basic features that a UI framework needs to get right.
- jshier 3y agoApple seems to think the UI frameworks should only focus on UI, and so overall arch is an afterthought. You can, of course, navigate and store state using the tools provided, but it's a pain to do so beyond local screens, where you have to manually pass things around, and you lose most testability.
- jimbokun 3y agoWhen I tried using SwiftUI, the performance for scrolling through lists past a certain size was very painful. I guess there were ways to mitigate this slowness, but they were very unintuitive and did not give me confidence in the developers commitment to keeping apps snappy and responsive. The APIs for NSTableView and NSCollectionView, in contrast, were always very responsive and performant when used in the default way. All of this greatly reduced my trust in SwiftUI. Seems like they did not have performance in mind in the core design decisions of the framework, and only tested it on small data sizes. Maybe things have improved since then.
- jshier 3y agoNo, List still has some awful performance cliffs unless you go out of your way to model your infinite lists in a way it can handle. There are some nice UI / NSTableView / CollectionView wrappers nowadays though.
- interactivecode 3y agoThe great strength of SwiftUI is that until they have caught up with UIKit and AppKit you can just drop down to those frameworks. So you can use SwiftUI in 95% of your app and where you run into limitions you can use the lowerlevel NSCollectionView for example. Whats even cooler is that inside that NSCollectionView you can just use SwiftUI views again.
- mac-mc 3y agoThat has some unique edge cases as we have been discovering when you interleave UIKit and SwiftUI together. I kind of wish that SwiftUI was a clean break in some ways and did not depend on UIKit and avoid all the abstraction leak issues that have been arising as a result. I know that would never happen in practicality although.
- lenkite 3y agoI wish Apple had stuck to Model-View-Controller instead of shoehorning React philosophy into their native UI framework. Personally, I find the "old-school" way of doing things far easier to follow and understand.
- luizsantana 3y agoWell, migrating swift versions was not too fun