upvote
> I found myself fighting the language semantics in C# way more often than Java

What's an example? I find C# quite well designed despite the Chinese menu of features.

> Java is remarkably consistent and really doesn't have any sharp edges. Even with generics and type erasure [...]

These back to back with a straight face...What is a sharp edge in your mind?

reply
A sharp edge is writing meta typesystem code infolving covariance, invariance etc

Saw that in a typescript repository

It's ok when it's part of a very specific library, it's not ok using it as part of usual project code

reply
What is the significant difference to Java? In C# you would write something like Foo<out Bar> instead of Foo<? extends Bar> or some such thing.
reply
In c# you can't be generic over generic types. In java you can. Also enums can't implement interfaces.
reply
> A sharp edge is writing meta typesystem code infolving covariance, invariance etc

Like in Java? C# has its own sharp edges (like most or all languages), but it's almost disingenuous to bring a feature that is much more complex and weird in Java as an example.

reply
I personally enjoy Kotlin. There are potential warts with it, but those exist with other languages.

That said, Java taking it's time and observing the playing field is a huge benefit. And now that they've been slowly delivering new language features, it's really made it pretty nice flow of powerful well thought out extensions each release. There hasn't been one of the new features that I think missed the mark.

reply
Java lacks a ton of quality-of-life features that are table stakes in other languages, including C# and Kotlin. Auto-properties, async, extension methods, nullable reference types, primitive types, string interpolation/templates -- Java is inferior to C# in every one of these areas.
reply