5 ms·
What bother me the most about Swift, is it essentially a C# clone, actually worse, because C# has more features. It is a travesty that Apple chose to design yet
by pmalynin 11y ago
What bother me the most about Swift,
is it essentially a C# clone, actually worse, because C# has more features. It is a travesty that Apple chose to design yet another shit language when there are so many other alternatives. And now, like with Go, everybody is jumping on the band wagon because its Apple.
Sigh.
- akhilcacharya 11y agoC# clone? In what way?
- pmalynin 11y agohttp://swiftcomparsion.qiniudn.com/ http://swiftcomparsion.qiniudn.com/
- andybak 11y agoThat page reads like someone who doesn't know much about other languages cherry-picking and making dubious connections. A fair chunk of the Swift examples listed strike me as radically different to the C#
- deleted 11y ago[deleted]
- meddlepal 11y agoC# clone? It's far more like a Kotlin clone without the JVM.
- pcwalton 11y agoWhile I agree that Swift and C# share a lot of commonalities and are fairly similar languages, the better integration of Objective-C alone makes the new language worth it. I don't know anyone in PL who thinks Swift is a bad language. It's a nice, conservative, tasteful design that uplifts some proven functional features. What's not to like?
- fishnchips 11y agoI don't think it is a bad language but I think it sometimes introduces unnecessary complexity: custom getters and setters on properties, will-set/did-set blocks and operator overriding (including precedence and associativity). Also, coming from a background where pointers are an obvious thing I do not understand why classes and structs need to be separate data types. None of these things is a bad per se but I do think they make the learning curve steeper and invite some level of abuse. Reminds me a lot of C++.
- apetrovic 11y agoI've working in C# for eight years before switching to iOS. To me, Swift and C# similarity ends with use of curly braces. C# is, in essence, better Java. Much, much better Java. Swift is a different language, it implements some new ideas (much more advanced type inference) and forces the programmer to thinks in a different way (by trying to eliminate nullability). Swift is not a perfect language (my biggest gripe is very awkward generics implementation), but it is a good language, and it's getting better. Saying that it's "a shit language currently on the spot just because Apple" isn't fair, I think.
- austinz 11y agoI love C# and think it's a great language, but when it was as old as Swift is now it was widely perceived as a Java clone. In fact, even today C# and Java are much closer in language design philosophy and implementation than C# and Swift, and calling Swift a "C# clone" betrays a profound lack of familiarity with what Swift is or how it works.
- millstone 11y agoSwift borrows some ideas from C#, along with Kotlin, ObjC, and others. It's also radically different from C#: 1. Swift collections and strings are value types, but in C# they are reference types 2. Swift strings are mutable, C# strings are not 3. C# by default allows reference types to be nil, Swift does not 4. Swift performs overflow checking by default, C# does not 5. Swift is reference counted, C# is GCed 6. Swift's inouts are very different from C#'s ref. For example, Swift's inouts support properties 7. Swift's error handling is quite different from C#'s exceptions, both in syntax and implementation 8. Swift's enums act as algebraic data types, C# has nothing like this 9. Swift's switch statements are much more flexible than C#, because of where clauses and more. These are some radical departures! The differences between Swift and C# are much greater than the differences between C# and Java.
- peterashford 11y agoThat sounds really trivial to me. You've described less difference between Swift and C# than exists between C# and Java and those latter languages are commonly thought to bew very similar.
- flamethroeaway 11y agoAnd C# is a Java clone which is a C++ clone which is a C clone. Who cares if languages take other languages as inspiration? Would you prefer a Disney-like situation where innovation is stifled because that is no longer possible?