DEV Community

Discussion on: Kotlin vs. Swift: Are Android and iOS moving towards creating a universal language?

Collapse
 
t4rzsan profile image
Jakob Christensen

Hi Lovis,

While I agree that C# is getting older it is certainly not getting outdated. Microsoft continuously improves the language, mostly by making it more functional. Just recently they added tuples and pattern matching.

I cannot speak for Kotlin, but I find it interesting that you think there is more boilerplate code in C# than in Swift. I work with both languages and I like them both. The main differences are in reference counting vs. garbage collection and in how the languages allocate memory on the heap vs. the stack. I actually find that the reference counting in Swift adds some extra boilerplate with the weak, unowned, and @escaping keywords.

On the other hand, Swift has some really cool syntax features when it comes to lambdas.

Compared to functional languages like F#, both Swift and C# add a lot of boilerplate stuff though.

By the way, you should try Visual Studio for Mac which gives you both macOS and iOS developing (as well as ASP.NET Core). In my hubmle opinion, XCode is seriously lacking when it comes to code editing and debugging :-)

Best regards,
Jakob

Thread Thread
 
lovis profile image
Lovis • Edited

Hey Jakob! :-)
You're right with the extra boilerplate for the ARC.
However, I'm on Kotlin, not on Swift, and Kotlin is Garbage collected.

My point with the boilerplate, though is that Kotlin and Swift are developed with Android/iOS in mind, and they will therefore probably always be more suited for that