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?
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.
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.
Idea Incubator
Renato Perini
Jan Vladimir Mostert
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: https://goo.gl/CKGmQP