4 ms·
>Swift itself is also quite nice - although it’s evolving really, really fast and tutorials/howtos and such go stale really quickly. Swift can and will drop lan
by zionic 5y ago
>Swift itself is also quite nice - although it’s evolving really, really fast and tutorials/howtos and such go stale really quickly. Swift can and will drop language feature at the drop of a hat. Just today I wanted to do a simple C++ style for loop only to find this was removed completely from the language.
What are you talking about? Swift has had (and still has) basic for loops since 1.0. What am I missing here?
- logbiscuitswave 5y agoDetails: https://github.com/apple/swift-evolution/blob/main/proposals/0007-remove-c-style-for-loops.md https://github.com/apple/swift-evolution/blob/main/proposals... There were plenty of alternative ways to accomplish my scenario but they ended up being pretty clunky and overly expressive for what I was trying to do at the time. It seems like the Swift language designers have no qualms about removing language features and breaking old code as a result - which is certainly their prerogative but it’s not something I’m accustomed to.
- zionic 5y agoWait, is this some kind of a joke? That's swift evolution number *seven*. They're on hundreds now. That was committed in 2015. This is what, Swift 1.x days? Before? What production code was even using swift back then? The vast majority of people didn't _start_ using swift until 3.x. I know we're supposed to take the best-possible interpretation of someone's comments here, and in my opinion a joke is the best possible take on the above post. The alternative is you're being disingenuous.
- logbiscuitswave 5y agoNot sure where these accusations are coming coming from but no joke or disingenuousness was intended here. You replied to my comment originally and I answered your question with more details. I’ve said before that Swift is a relatively new language to me. I’m not up to date on its many “evolutions” or particularly familiar with its history and nuances. I am not even sure what Swift version I’m on right now other than “whatever the latest version of Xcode uses”. I’m just trying to learn the Swift/SwiftUI stack by writing some code for MacOS and iOS as part of a hobbyist project that I’m working on during my downtime. When I was trying to do something that’s worked fine in many other languages the Swift compiler literally told me “no” because it had been removed from the language in version X. I mean whatever - I found how to work around this - it was a kind of clunky and overwrought one versus the simplicity of the original code but it met my needs and it was a teachable moment. My overarching point originally wasn’t meant as a hard criticism of Swift. I’m fact I quite like it. It was an observation that Swift is unlike other languages I work with regularly where it’s rare that language features are ever removed (or at worst hidden behind compiler or feature flags). Swift’s designers clearly think it’s ok to remove things they don’t like or they don’t think meets their vision. That’s fine and valid. My point was that as a result of this stance that means tutorials and samples can become stale in a way that I don’t see with the other languages I work with where you’re more likely to be using old methodologies or obsolete APIs - that can/should emit compiler warnings or IDE refactor hints - but otherwise won’t fail to compile because something was removed completely.