3 ms·
I think a part of the problem with Swift is Swift's community apparent devotion to the "look, ma, advanced Swift!" mentality. The shorter, the more compressed a
by gary17the 5y ago
I think a part of the problem with Swift is Swift's community apparent devotion to the "look, ma, advanced Swift!" mentality. The shorter, the more compressed and the more arcane the code, the better programmer one is perceived to be. For example, I've been criticized by code reviewers for using simple, short if/else block runs, while convoluted, multiply-composed higher-order function chains with platform API mixed in were recommended instead, yielding entire micro-features that no part of a problem statement even asked for.
Moreover, if you also consider that Swift heavily uses type inference (if a compiler is allowed to infer something, your brain will have to as well, when you look at the code) and includes lots of edge-case syntactic variation (say, multiple trailing closures) or special-purpose features (say, SwiftUI builders), it is no wonder that even an advanced programmer can look at a piece of Swift and go: "WTF does this thing even do??". On top of all that, add a complicated generics system (i.e., Protocol-Oriented Programming) with conditional interface adoption and default implementation inclusion and you get a Frankenstein that only Apple fanatics can love.
Swift seems to be great for only two kinds of programmers: the small snippet "Hello World" crowd and absolute Swift experts. Intermediate programmers probably just get lost in the language with a sinking feeling.
Regardless of the fact that I have over 10 years of C++ under my belt, I experienced so much unexpected, recurring frustration with Swift over the course of a couple of years that I started migrating away toward Python. The devotion to simplicity, predictability and elegance expressed by the Python community feels, by comparison, revitalizing to me.
Not a rant, just my $0.02.