4 ms·
I love C# and in every iteration we're getting more and more features to get C-like performance in a lot of scenarios. C# does it really well because if your pr
by glimshe 5mo ago
I love C# and in every iteration we're getting more and more features to get C-like performance in a lot of scenarios. C# does it really well because if your problem isn't performance/memory-constrained, you can ignore these features and fallback on the language's natural ease of use.
- hirvi74 5mo agoI daylight as a .NET dev professionally. I completely agree with what you have wrote, but I do not think C# is particularly unique in that regard. I would say many common compiled languages are on the same path, e.g., Swift, Java, Kotlin, etc.. As time progresses, I am finding it harder to justify using C# for a greenfield project.
- za3faran 5mo ago> As time progresses, I am finding it harder to justify using C# for a greenfield project. Are you able to elaborate why? Just curious.
- antonymoose 5mo agoNot OP here - but for me it’s the open source ecosystem. Java just wins in terms of scope, scale, and stability. I love C# the language, but the ecosystem is a ghetto.
- Rohansi 5mo agoI see this reason a lot but what are some actual examples of what is lacking in the .NET ecosystem vs. Java?
- davewritescode 5mo agoLarge Apache ecosystem (Spark, Flink, Pinot) is completely missing and third-party SDKS (looking at you AWS) almost ALWAYS have worse SDKs. The java Kinesis consumer and producer libraries are amazing, the ones for C# are simple wrappers around the AWS APIs which means there's a few foot guns waiting for developers to run into, even if they should know better.
- Rohansi 5mo agoGood point. The majority of Apache projects are Java. Amazon is also mostly Java internally.
- Amekedl 5mo agoDev tools. The debugger is something for example that Microsoft ostensibly keeps to their own products, and how they totally slaughtered omnisharp. It killed my daily csharp vscode driver couple of years ago, only now catching back up somewhat, but still unusable for bigger solutions. That move made me gravitate towards vscodium, and avoiding csharp where possible. Microsoft's move only recently got more understandable to me, because Cursor and others basically stole vscode to establish their "empire".
- jayd16 5mo agoIf you can use Jetbrains, Rider is on par with IntelliJ. From that perspective, both languages have a best in class debugger.
- 369548684892826 5mo agoRider is very good but this subthread is about the lack of open source dev tooling.
- free652 5mo agoI mean I haven't done much in c# recently, but few examples that c# ecosystem is the subpar in quality Kafka client library sucks, I mean it was a nightmare to make it stable and there were a few of them. Pdfbox library And many other libraries. If you use c# Microsoft libraries only - then you are golden. outside of that its really bad. At this point I switched to Rust.
- pjmlp 5mo agoLots of implementations and industry standards, many mix Java with OpenJDK. It is not, Java is like C, C++, JavaScript and co. There are many implementations, the language and runtime are evolving by industry partners, you get bare metal implementations with real time GC like PTC and Aicas (doing AOT for decades), JIT caches, cloud based JIT compilers (OpenJ9 and Azul), pauseless GC, an LLVM like compiler development framework (Graal),.... There are industry standards like Microprofile and Jakarta EE, which several vendors base their frameworks and application servers on. And a mobile phone platform, which while isn't proper Java compliant, has enough pieces into it that makes it easier to integrate Java code and libraries, than using Xamarin. Microsoft actually bothered with ECMA during the early days, however it hasn't been updated since C# 7.3, .NET Framework 4.8.
- Rohansi 5mo ago> Microsoft actually bothered with ECMA during the early days, however it hasn't been updated since C# 7.3, .NET Framework 4.8. I know it's not a popular opinion but I don't see why they should bother. There are already multiple implementations that serve different use cases, but they are slowly converging into one. There are more languages+runtimes which do not have formal specifications than those that do, and that's okay! Fragmentation is not a good thing.
- JohannesH 5mo agoA good built-in/open xslt3 processor.
- biglyburrito 5mo agoSupport for OpenAPI 3.1 in .NET sucks. Up until recently, a third-party library (Swashbuckle) has been the heavyweight, but lagged for years in supporting new features & fixing old bugs. Microsoft created a first party option (Microsoft.AspNetCore.OpenApi) that supports 3.1, but it’s nowhere near feature parity with Swashbuckle yet. I also find serialization/deserialization to be weak in .NET. Third-party Newtonsoft was king for years, then Microsoft released System.Text.Json. Years later, it lacks feature parity, including an easy way to debug like Newtonsoft did.
- hirvi74 5mo agoPoor reporting libraries, PDF libraries, multiple popular open source projects have randomly gone proprietary (some after a decade+), etc..
- hirvi74 5mo agoGP here. What I meant is that I try to be pragmatic when writing applications. Most languages solve most problems with relatively minor differences between them. Of course, some languages excel in areas few or others do not. When it comes to C#, I struggle to justify when it is the “right tool for the right job.” If I were building a game in Unity, C# makes sense as it’s the only option. But if I were to build, I do not know, a FizzBuzz Widget, why use C# over any other language? The only answer I can usually come up with is language familiarity. My employer’s answer to that question would be, “Because C# is a Microsoft product.”
- kensai 5mo agoDo you think by now C# has left Java behind in features and performance?
- gfody 5mo agomore than 10 years ago, yes
- paavohtl 5mo agoMore like 25. C# 1.0 already had capabilities Java developers are still dreaming of, like structs / value types, properties and operator overloading. C# 2.0 in 2005 introduced generics, implemented far more competently than Java ever did.
- pjmlp 5mo agoThe difference is BDFL or design by committee, a big difference between both ecosystems.
- stevefan1999 5mo agoWell, what's the difference between a (benefactory or not) dictator or an oligarch?
- joe_mwangi 5mo agoNotice you point out features that were easy to add during the beginning where there was no concern of backward compatibility? Now that java is porting value classes to mainline and we might have them soon, and planned operator overloading through type class, I believe java approach is making careful design choices that are semantically sound, rather than adding features that create edge cases such as boxing invariants in unions like C#.
- mrsmrtss 5mo agoSo you try to say that Java gets to be more semantically sound by making bad choices early on? That does not make sense. Those choices are very difficult fix today and many of them can't be fixed. Say what you want but semantically more sound Java won't be. And the boxing with C# unions can and will be addressed later, this was a deliberate choice by the team to bring unions earlier.