5 ms·
There's a lot I love about Swift, but I fear it's quickly becoming too complicated for its own good. There are just so many ways to solve a problem now that it
by codr7 1y ago
There's a lot I love about Swift, but I fear it's quickly becoming too complicated for its own good.
There are just so many ways to solve a problem now that it's more or less impossible for someone to be familiar with all of them.
- 90s_dev 1y agoSo it's becoming C++?
- hirvi74 1y agoConsidering Swift was primarily written in C++, perhaps Swift was always destined to follow the same path?
- rcruzeiro 1y agoSo following this same reasoning Python should become C?
- hirvi74 1y agoI like how you think. I'm down for it. I have never liked dynamically typed languages.
- codr7 1y agoMakes some sense, since its developers probably thought C++ was a pretty good idea, it just needed some more features. Same mindset that killed Rust for me. I gave up on C++ for good reasons, after spending roughly 20 years trying to make sense of it.
- 90s_dev 1y agoWhy not just code in a small, sane subset of C++ that you understand perfectly? That's what I do with TypeScript and it works fine.
- codr7 1y agoThat's my feeling, and it makes me sad because I have largely given up on C++ for that reason.
- Hashex129542 1y agoIt's becoming Rust.
- codr7 1y agoWhich I never even bothered with, for that reason.
- metaltyphoon 1y agoFor some reason, I find Rust much easier to understand. Swift has so many constructs and special syntax while Rust is much more "tidy" with the syntax.
- arecurrence 1y agoI too wish deprecation with migration path was a more common pattern in today's language development. The language has very much needed work and the numerous bugs within Apple's own libraries certainly hasn't helped. That said, some of the, erm, "new ways" to solve problems have been significant advancements. EG: Async/Await was a huge improvement over Combine for a wide variety of scenarios.
- storoj 1y agoIMO async/await and Combine are two completely different things. What is the alternative to Combine's CurrentValueSubject or combineLatest()?
- lukeh 1y agoAsyncExtensions implements many Combine-like patterns in structured concurrency.
- andrekandre 1y ago> What is the alternative to Combine's CurrentValueSubject or combineLatest()? combine latest et al can be found in async algorithms from apple* https://github.com/apple/swift-async-algorithms https://github.com/apple/swift-async-algorithms * though current value subject is not there its not hard to make one if you need it
- amichail 1y agoIs having too many ways to solve a problem an issue for solo indie developers?
- myHNAccount123 1y agoRight? I don't get this persons sentiment and I don't understand how it relates to the post in particular.
- deleted 1y ago[deleted]
- codr7 1y agoYou still have to choose, and remember all the variants. Coming back to a Swift codebase after a few months in different languages is surreal, I can't remember what half of it means.
- myHNAccount123 1y agoAlright, I think I know what you mean - swift does have a peculiar way of completing tasks but I would also say C++ and ObjC do too but I also don't think there are too many ways. I find you can do apply java and javascript type thinking to swift but they're less preferred.
- jimbokun 1y agoIt can be if you keep adding the new way of doing things and then need to debug code that jumps between all the different ways of doing things.
- deleted 1y ago[deleted]
- favorited 1y agoMany of these features have convoluted-sounding names like "global-actor isolated conformances" or "control default actor isolation inference," but they are changes that make actually using the language simpler. People aren't expected to really learn that there is a "feature" called global-actor isolated conformances, but at some point they'll try to make a UI type conform to `Equatable,` and instead of an error saying you can't do that, they'll get a fixit about needing to specify the conformance as `struct MyUIType: @MainActor Equatable` instead. I bet 99% of codebases won't use "method and initializer key paths," but there's really no reason why you should be able to get a key path to a property, but not a method. It just hadn't been implemented yet, and the language is more consistent now. Personally, I think raw identifiers are kinda dumb, but that just means I won't use them. IMO there isn't really more cognitive overhead when using the language because it's possible to use spaces in function names now.
- jimbokun 1y agoYeah, I’m not an active Swift developer. But reading this article about all the existing complexity and all the new complexity in this update makes me think Swift has jumped the shark.