GO vs (C# & Java)

I need a comprehensive comparison of Go against C# and Java. I've been told that Go is great for handling specific services but not for writing your entire codebase in it especially if you are building a large application that requires a rich ecosystem. Is that true? Is it preferable to write most services in C# or Java and to leave Go for the most i/o intensive service(s) ?

Attached: go.jpg (1280x710, 57.35K)

Other urls found in this thread:

en.wikipedia.org/wiki/Real-time_operating_system
twitter.com/NSFWRedditGif

Go compiles to natively executable code, making it perfect for smaller CLI utilities. The language itself is literally and unironically designed for retards and doesn't have much complexity, which is fine for smaller code bases but horrible for anything large.

C#/Java are both more battle tested and generally better for web servers and enterprise applications, but because they are JIT-compiled and not compiled ahead of time they are worse for smaller frequently-run CLI utils because of startup times.

>that requires a rich ecosystem
Depends on your specific needs. Go can be a bit hit-or-miss but I think it's perfectly fine in most cases.
Yes, you typically have to hand-roll stuff that you wouldn't in Java (never used C# but I assume it's similar).
If that's a deal breaker, don't use Go.

Also, if you need or prefer Java/C# for some of the services, I see no reason to introduce Go for the rest of them.
Personally I'd use Go all the way if at all feasible for the project but that's just me. Java is fine.

Why are you asking?

The language you choose depends on the reason. If you don't know any of the three languages, Java has the best job prospects going forward with C# being a very close second.

C# has more corporate power behind it at the moment. Microsoft is throwing a lot of time and treasure into developing the language hoping to attract developers to their framework and Azure. Whenever a big corp is pushing something it's a nice opportunity to find a wave to ride. At the end of the day you won't regret either Java or C#.

I don't know what Go is. Is that some kind of zoomer Fortnight dance?

Java is better for large projects while Go is better for small ones. C# is better if you are on Windows.

this is bait right

I was given the responsibility to manage a project for the first time. It's an application requiring real time concurrent i/o that may end up scaling rapidly. The scalability concerns were highlighted and emphasized time and time again in the client specifications. I have a solid experience with ASP.NET Core and this is our main stack but we also have few developers who already worked with Go or at least have a minimal experience with the language and i thought i'd suggest the use of Go which, in my opinion, is better for this use case. My idea is to write all the conventional services in ASP.NET Core and use Go for two I/O intensive ones. I will have the opportunity to make that proposal in our next meeting. Should i limit myself to ASP.NET Core or is my reasoning good?

Am i overdoing it ?

>real time
Skip all of the languages you named. You cannot have a real-time system in garbage collected languages.

>You cannot have a real-time system in garbage collected languages.
That is a presumptuous assumption. There are several companies using garbage collected languages for real time i/o. Google is replacing all it's C++ code with Go and Uber uses it for it's real time geofencing service. I'm sure there are similar cases where Java or C# are used. Do you have anything to back your claims?

Are we talking about the same real-time thing? Like, this kind of real-time operation: en.wikipedia.org/wiki/Real-time_operating_system

C# and java produces monoliths (unless you go something like Quarkus)

Go is for microservices, you develop the echosystem by dividing the different stateowners into their own smaller services which are deployed as a whole product in some clustered environment

Also: Why are you asking this here? Ask stackoverflow or something, which has people who are both employed and has experience with larger systems

SO would immediately downvote and close this question as opinion-based. You never been on there?

>C# and java produces monoliths (unless you go something like Quarkus)
My company has been building microservices in ASP.NET Core for god knows how long and well before i was hired there. Most Java applications are actually split into microservices too. What makes you think that c# and java are for monoliths and go is for microservices actually??

>Also: Why are you asking this here? Ask stackoverflow or something
I am not ruling any platform out.

most people who are referring to "real-time" systems mean things with reliable, short (as in: single-digit ms) execution time, e.g. games, HFT, simulation systems, etc.
the GC pauses in a language like Go are unpredictable enough and long enough (even though they're short) to rule it out for those applications
it's probably just a terminological crossing-of-wires

Do some prototyping and benchmarking for your use case before comitting on anything. Communicate that clearly.

Go is based. Recommend it for graphql apis. Grpc very nice as well. Rest apis it's a pain to manage json conversions everywhere. Asp net core is much nicer for usual rest. Openapi/swagger support sucks compared to aspnet and you really want that for rest. Gqlgen then feels really good compared to graphql offerings in aspnet.

Java is probably more useful than Go even for HFT, because it has state of the art garbage collection & you have a choice of GC methodology. There's a couple of HFT companies which uses Java IIRC.

OP - Go is only better than Java for 1) smaller executables 2) faster cold-start time 3) lower memory usage.

Otherwise use Java. Google basically uses Go to save money on physical servers.

Go is just compiled Python, therefore retard friendly.

Java is enterprise-boomer boring language.
C# is just Java but Microsoft.

>It's an application requiring real time concurrent i/o that may end up scaling rapidly.
Hmm. From my experience async in C# produces huge amounts of garbage (basically, any place where you have to switch from ValueTask to Task will allocate, and lambdas do a lot of unnecessary capturing).
The GC in C# isn't really that good either.

Or you could just switch to Rust :)

Attached: 1646982569523.jpg (592x512, 53.94K)

No time to learn a new language. I'd rather use C++ if i really had to. We don't have Rust developers and i don't believe it's necessary to use neither Rust nor C++ anyways.

>Go is just compiled Python, therefore retard friendly.
Thanks, this made me look into it. Not a retard, but I like things to be as comfy as possible (e.g. I'm getting angry quite fast). So in that regard it's a bit like Nim.