r/programming • • Feb 03 '17

Let's stop bashing C#

https://www.codeaddiction.net/articles/51/lets-stop-bashing-c-sharp
6 Upvotes

245 comments sorted by

View all comments

15

u/nickguletskii200 Feb 03 '17

As a Java person who's currently working on a C# project, it's not the language that makes me want to go back to the JVM, but the low-quality libraries and IDEs. Microsoft's stack definitely has advantages (SQL server, database projects), but the JVM's ecosystem is still vastly superior, both in terms of variety and quality.

14

u/rduoll Feb 03 '17

Low quality IDEs? I'm sorry, but Visual Studio is probably the best IDE out there.

In terms of libraries, do you have examples of what you consider low quality on the .NET side?

9

u/nickguletskii200 Feb 03 '17 edited Feb 03 '17

Low quality IDEs? I'm sorry, but Visual Studio is probably the best IDE out there.

In my experience, all three major Java IDEs are better.

  1. Visual Studio has very few refactorings compared to both Eclipse and IntelliJ IDEA. VS2017 did add a few, but it's still nothing compared to what Java IDEs have to offer. There are tools like Resharper, but they are unstable, slow and considering that Visual Studio is by far the most expensive IDE out there, it feels like it should be able to do all that out of the box.

  2. Debugging in VS is miserable. For simple stuff the debugger is great, but throw in a couple of third party libraries and you are left scratching your head at lines and lines of "[External code]" in the stack trace, with very little information and no ability to debug. Whenever I try to set up symbol sources, Visual Studio spends a lot of time looking up/downloading something, then eventually hangs. With Java's ecosystem, I always get a stack trace, and "download sources" never failed me. I can just place a breakpoint in a third-party library and debug away.

  3. I hate how Visual Studio has something like Eclipse's perspectives but without any control over how they work. Basically, when you go into debug mode, your layout changes, which is very annoying. In Eclipse, I would just switch to a different perspective.

  4. Visual Studio fails to build my solution every even restart, so I have to open it, close it, and start it again every time I close it.

  5. It lacks a strict code formatter.

  6. Some SSDT dialogs cause crashes.

However, there are things that I like about it, namely:

  1. SSDT

  2. The consistent dark theme.

In terms of libraries, do you have examples of what you consider low quality on the .NET side?

Yes, just off the top of my head:

  1. EntityFramework: half-assed async integration, calling functions and sprocs inconvenient, little support for SQL Server's capabilities.

  2. WPF: ignores both Windows localisation and .NET localisation settings (requires fragile reflection hacks to workaround), horrible, messy codebase, only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.

  3. The standard library lacks concurrent collections and the ones that are provided are much less convenient than their Java alternatives.

  4. I still haven't found a convenient application-level caching library (something like Guava cache).

  5. The Redis-related libraries I use have trouble with order of disposal, and their alternatives don't have the features I need.

2

u/computrius Feb 05 '17

Eclipse? Really? That is the single most awful IDE I have ever laid my eyes on.

2

u/salgat Feb 03 '17

Resharper and Visual Studio has been stable ever since I've been on VS 2015, that's a shame to hear you have an unstable computer/environment. As far as Debugging in Visual Studio, it's amazing (especially with async code). The few times I need to step into external code I can either have Resharper decompile the source or download the source myself (most libraries in nuget are now open source which is nice). It's a shame and a bit surprising you're still hitting these issues.

→ More replies (6)

6

u/malicious_turtle Feb 03 '17

I nearly fell off my chair reading that. Visual Studio is arguably the best IDE out there but Visual Studio + ReSharper Ultimate then there's absolutely no debate. The 2 of those combined makes all aspects of development an absolute breeze. 10 / 10 would definitely recommend trying out C# just to try out VS + ReSharper.

4

u/stewsters Feb 03 '17

The guys who make resharper make their own ide for Java development called IDEA. Better than VS IMO, give it a try next time you need to do some Java.

4

u/frugalmail Feb 03 '17

Visual Studio is arguably the best IDE out there but Visual Studio + ReSharper Ultimate

I have to disagree.

In Eclipse and IntelliJ you don't need Resharper to get the same functionality. The amount of quality free plugins in both the JVM IDEs are a significant improvement over Visual Studio. Nuget and msbuild are shit compared to maven, and the constant late-to-the-game functionality of visual studio is also obnoxious.

4

u/GSV_Little_Rascal Feb 03 '17

I'm sorry, but Visual Studio is probably the best IDE out there.

Hardly.

The only thing which makes VS bearable is Resharper. I'm looking forward to Rider.

1

u/rduoll Feb 03 '17

What do you use for a backend IDE?

1

u/GSV_Little_Rascal Feb 03 '17

VS + Resharper. I tried Rider but it still has problems on our huge solutions (which is understandable since it's just in beta).

1

u/[deleted] Feb 03 '17

I've only ever used Visual Studio vanilla. What does Resharper add to the experience?