Do you believe C# copied most of the features of Java and became an improved language?

We had a discussion at my workplace. So, I thought to ask developers here what they think. My question is :

Is C# an improved Java?

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

Jan Vladimir Mostert's photo

C# certainly copied a lot from Java and improved in many cases as well as innovated in terms of Lambda support which Java only got in Java8, operator overloading which I wish Java would add, but also mucked up things like Enums. Java's concurrency is also still far superior to C#. So C# has done a decent job at building a better Java in many aspects, but still falls short in many areas - so both are great languages, both have rivalling features that are better than the other.

If I wanted to build a desktop application in Windows, I'd certainly choose C# over Java, anything enterprise that needs to run on servers, I'd still choose Java simply due to the bigger availability of options, it having much better cross-platform support and simply due to maturity.

C# could have done so much better for itself if it had Linux support or cross-platform support from day one, but Steve Balmer proclaimed that Linux is a cancer and effectively limited C#'s scope to Windows servers - now C# will forever be branded as that language that only runs on Windows.

Here's an in depth comparison from somebody who's used both, it's from 2007 though, so somewhat outdated:

Show +1 replies
Corstiaan's photo

MS is open sourcing the next iterations of .net and making them cross-platform out of the box. The next few years will be very interesting. Have a look at and Also, what Mono and Xamarin have done for c# and .net is pretty cool as well. I work with both c# and ruby, so I'm not pushing c# here ;-).

Jan Vladimir Mostert's photo

Mono never got full support from MS until very late in the game, they merely tolerated it; personally I would not use an environment that could be shut down by patent litigation at any time. The fact that they're open-sourcing now may be a little too late, but nevertheless a step in the right direction.

Cecil Phillip's photo

C# definitely took some quite a bit of inspiration from Java, but also other languages as well such as C++, Haskell and Pascal. Today we can see the reverse happening with Java being inspired from the innovation that C# has seen. The "borrowing" of features between languages is fairly common place today. JavaScript (ES7) and python are getting async/await keywords that come out of C#. JavaScript (ES6) module imports look very similar to pythons. Some of the new Java 8 features have come in response to Scala.

That being said, most of the newer and innovative features of C# today such as anonymous functions, Linq, async/await and expression bodied members are features that I'm sure many Java devs would love to have. I agree with @JanVladimirMostert. The Java ecosystem leads in many regards, particularly in cross-platform productivity. However, that has more to do with the sdks and tooling versus actual language features. Cross platform .NET/C# is needed, is long over due and has some catching up to do.

Renato Perini's photo

Copying already available features from a language and implementing every single idiocy from the programming language research doesn't make a good language. By contrast, having a more limited set of features, doesn't make a language "worse". We live in a world where programming languages must be powerful enough to accomplish every day tasks, but still be manageable by a single individual. And hey, Java is a big language when you start from scratch, still maintains some simplicity when dealing with complex tasks. Take Scala, for example. It has a rich syntax with tons of features, 2 full paradigms (OO and functional). Learnign Scala as a first language is not that easy compared to other languages. Even experienced developers may find it to be steep, at times. Despite the fact C# may be a good language, I consider it to be highly inconvenient compared to Java. The enteprise market has been (and still is) predated by Java. And for obvious reasons. The language evolves without trying to "implement the whole world". Only proven (by the industry) language features are implemented. If some features will be considered useful to have, they will be implemented eventually.

Jan Vladimir Mostert's photo

Somebody once said, if you try and add every feature to a language, you get perl, hehe