Hacker News new | past | comments | ask | show | jobs | submit login

I'd argue the other way around.

Not to mention that developing C# in Visual Studio or Rider feels years ahead of what's considered good enough IDE assistance in other languages. Comparable with Java even.




In some ways, Swift is a higher-level Rust. It places a lot more emphasis on functional programming, null safety, value types and immutability than C# does.

The more flexible memory management model added recently, native binaries, (as the default option) and even identifier: Type over type identifier is also a nice plus for me, I agree that the IDE situation is heavily in C#'s favor.

If C# is a nicer Java and Kotlin is a nicer C#, then Swift is a nicer Kotlin.

What would you argue C# has going for it over Swift?


null safety modern C# has optional chaining, Elvis operator and non nullable types value types C# has value types contrary to Java (until project Panama)

What would you argue C# has going for it over Swift? feature wise I don't know but it clearly has a far bigger lib ecosystem which is the most important criterion


Yes, some of these have been slowly added, similar with Java slowly moving to embrace features from Scala and Kotlin, but to me it doesn't feel as nice, rather sort of baked on and many of the libraries don't use these latest features.

Swift was designed to seamlessly blend functional and OO styles from the get go.

Fundamentally, there's still classes and inheritance everywhere in C#, which is also what I hated about Cocoa and using it from Swift before they came out with SwiftUI.

Now don't get me wrong, I am not saying C# is a bad language, just that when you compare it with Swift, Kotlin, Rust etc, it's clearly playing catchup.

> far bigger lib ecosystem which is the most important criterion

Going by that metric, you could argue there's no point to C#, because Java likely still wins handsomely on that front and maybe Java should just give it up to JavaScript anyway.

Clearly we don't just evaluate languages solely by the size of their ecosystem. There's a critical mass that needs to be achieved, but at some point there's 2-3 libs for everything you may want to do and simly having 5 more is not magically better, the same way having "millions of apps" on the App Store doesn't mean much if most of them are not that great and people stick to just a few.

As an example, the GUI situation on Windows clearly offers more choice for C# devs as to how they want to go about their GUI, but I'd argue the Windows GUI situation is a bit of a hot mess right now and SwiftUI seems like a breath of fresh air compared to that.


> Now don't get me wrong, I am not saying C# is a bad language, just that when you compare it with Swift, Kotlin, Rust etc, it's clearly playing catchup.

btw. it's the other way round. most modern stuff was in c# while the others played catchup and some still do. no language has async/await implemented as good as c# has, no language has nullable value types as good as c# no languages has a reflection api that is really easy to use and if that isn't enough there are also expressions which are more like macros and due to the way how generics are implemented no internal api sucks. btw. c# even has channels.

swift has nothing over c# and all features swift has were more likely be in c# before they were in swift.


no language has nullable value types as good as c# What's different from kotlin or typescript nullable value types + smartcasts?


I like C# for balancing both implement new features (in easier way IMO) and keep compatibility.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: