top | item 43595352

(no title)

erikrothoff | 11 months ago

Is this still a thing in Swift? I loved Swift 1, spent a couple of days upgrading to Swift 2, a week or more for Swift 3. At that point I just switched to React Native. I understand that iterating is generally a good thing, but the constant cykle breaking changes in the language was just too much.

discuss

order

Daedren|11 months ago

Yes. It feels like the language is being handled by academics who don't actually use it, Swift 6 really drives it down.

The lack of Sendable support for Combine and half-assed support on Async Algorithms only makes it more painful to transition at this point in time.

iamkonstantin|11 months ago

It's now almost a full year since Swift 6 (concurrency) was introduced, and I've spent a lot of time rewriting, debugging and generally tweaking things to make the compiler happy... The promise of "strict concurrency" is yet to yield any meaningful benefit, despite the huge cost of having it.

I think the pursuit of some kind of semantic purity in the Swift language overshadows more practical needs and concerns. Making Swift too different from its neighbours like Kotlin and Rust also makes it harder to context switch. It now takes a lot more time and effort to get into the flow of developing native things for iOS...

saagarjha|11 months ago

Disagree about the academics point but Async Algorithms is basically an abandoned project at this point. There is someone working on it but the intention is that it evolves basically at the pace that the language does, but without the investment that the language gets. I would recommend against relying on anything going on there.

DidYaWipe|11 months ago

Let's not forget the absurd insistence on "will change" semantics in onChange() instead of the far-more-useful notification "did change."

And of course the brain-dead design of withObservationTracking, which only fires on the FIRST change of a value. I mean... by what definition is that "tracking?" It's goddamned useless, unless of course you implement the clumsy workaround of re-establishing observation tracking every (first) time it fires.

Then there's the bizarre hypocrisy of evangelizing the "single source of truth" while telling everyone to prefer structs over classes in Swift. But structs are COPIED everywhere, which of course breaks the "single source of truth" on the first function call.

I wasted so much time trying to conform to these "best practices" until I finally realized that the people promoting them don't know WTF they're doing. Then I went back to classes, injected the "single source" everywhere it was needed, and got to work adding functionality.

And let's not even get into the half-assery that is SwiftUI... still, all these years later.