Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Open to you educating me here! I (maybe naively) see their design goals being very similar:

- Enterprise Devs as the core user (Type safety, great stdlib)

- High level OO based interfaces

- Allows for low enough level programming that you can reasonably use in place of C/C++

The differences seem to be more minor:

- opinionated (C#) vs unopinionated (Java) when it comes to what tools / libraries you reach for.

- Conservative (Java) vs Experimental (C#) when it comes to releasing new language features

- Execution model: Java seems like a better choice for "run anywhere" but C# has been indexing more in this direction





> - Enterprise Devs as the core user (Type safety, great stdlib)

> - High level OO based interfaces

> - Allows for low enough level programming that you can reasonably use in place of C/C++

This can reasonably said about any programming language that is popular. These points could also reasonably match Go.

C# and Java have had completely opposite design goals. C#'s design goals are to have a more powerful/complex language with a not as advanced runtime. Java is the exact opposite. They favor having a slower moving language while pushing the edge on having a very advanced runtime. They're only similar on the surface level being C-Like languages with a GC. The design philosophies have created very different languages with different implementations, for example async/await in C# vs virtual threads in Java.


To be fair. I'd be fine lumping Golang in this camp as well.

Theyre all different languages and ecosystems.

But in terms of what use cases they fill? Theyre more similar that not.

In otherwords if I'm evaluating Java for a use case, in many situations, I'd also be evaluating C# and/or Golang along side it.

Where as it would be less common for me to compare Java against Python, Javascript, Elixir, Erlang, Rust etc..


>This can reasonably said about any programming language that is popular

C++ does not have great stdlib, lol. Maybe "recently" it improved, but still.


Green threads in Java are only there because the async model implementation of the JVM is trash, don't even talk about generics

Also, Java didn't move for a very, very, very, very, very, very, very, long time because nobody cares. It took Microsoft to reinvest in it, and make things moving. Basically they took a bunch of C# specifications and translate them to JSR format.

Before that they port Rx from .NET Framework, to Java and Javascrit.


> Basically they took a bunch of C# specifications and translate them to JSR format.

I would really love for you to point out which ones, because I can't think of a single one. Most features being developed into Java are taken from ML, the OpenJdk team has said this numerous times.

> ecause the async model implementation of the JVM is trash

What model? They've never implemented async.. it's a compiler construct.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: