4 ms·
Same question. What advantages does C# the language have vs Java the language? Do people perceive Java as playing "catch up" with other languages? e: I only as
by skizm 10y ago
Same question. What advantages does C# the language have vs Java the language? Do people perceive Java as playing "catch up" with other languages?
e: I only ask because I've always heard the opposite.
- Analemma_ 10y agoI'm not sure where you would've heard the opposite. "Java the ecosystem" has clear advantages over "C# the ecosystem", but I've never heard anyone claim that Java is a better language. Things C# has that Java got years later or not at all include lambdas, LINQ, value types, reified generics, and async/await.
- on_and_off 10y agoPretty much everything that is in kotlin should have been in java for a while IMO and some of these features are in C#
- rubber_duck 10y agoKotlin fixes some of Java issues but it still can't fix JVM design decisions such as lack of value types (coming to JVM in what 5 years from now ?) and messy native interop. Java has some really fancy JIT compilers designed for servers but .NET is much more AoT/native interop friendly with value types and reified generics, you can get a lot closer to C++ like code with C# than with Java (avoiding GC with structs, controlling memory layouts in collections, etc.)
- serge2k 10y agoI prefer LINQ and C# lambdas to Java 8, but beyond that. Type inference, properties, extension methods, operator overloading, p/invoke vs JNI (plus C# has better unsafe code support), structs, reified generics, async/await
- shanxS 10y agoWell imho C# is bit more mature than Java. I am talking strictly in terms of "in-built" language features. For example, apart from LINQ, generics in C# dont do type erasure, as in Java. I am sure there are few more. [1] Of course, Java running on so many platforms is nothing less than a miracle but I am of opinion that C# language is more matured than Java language [1] https://msdn.microsoft.com/en-us/library/ms836794.aspx https://msdn.microsoft.com/en-us/library/ms836794.aspx