logoalt Hacker News

SurajMishra • today at 2:06 PM • 11 replies • view on HN

For the features that overlap between golang and .Net, can someone please let me know why people choose .Net over golang for non legacy systems? As far as my limited knowledge goes, go is much more efficient in syntax and memory.


Replies

fabian2k • today at 3:38 PM

The languages are very different. C# has much more powerful abstractions and is a much larger language in general. That is both an advantage and a disadvantage. Modern C# is also very fast, I wouldn't bet on Go winning that comparison.

My experience with Go is a while back, before it got generics. While I liked the overall idea of a language with little syntax and a focus on simplicity, I didn't really like Go in the end. It was a weird mix of too low-level and high level code. It exposed low level details that I don't need to think about in C#, and it is missing convenient abstractions like LINQ.

Personally, I like async/await in C# more than Go concurrency. I know this is heretical here, but I don't care about function coloring or any of the abstract advantages of other concurrency approaches. Async/Await in C# works for me (in non-legacy code) and is easy to understand.

netdevphoenix • today at 3:55 PM

Compare the ecosystems of .NET vs golang. No comparison whatsover. IoT, mobile, web (front and backend), cloud, etc. I think Go lacks variety and is more focused on traditional greybeard areas.

JamesSwift • today at 3:41 PM

Modern .net is surprisingly performant while also being very high level if needed. So it is very close to being a "learn once" ecosystem. This means you use it to write code for a much broader range of usecases than others, you will have a broader / more mature ecosystem than others, and your potential hiring market is more vast.

bjoli • today at 2:15 PM

Go isn't as much fun. And is usually slower for my work until I bump up the GC and then it uses roughly the same amount of memory.

I have also found c# async to be lighter than go's concurrency story, and dotnet11 is going to make that much more clear.

Now: I write software for fun, not for money.

➕ show 1 reply
jeswin • today at 3:17 PM

Go is not much more efficient, compared to NativeAOT - though it can be faster in some areas. The big reason why someone would want to use C# is that it's a more expressive language. You can even write your DB queries with LINQ (C# lets you express code as data), making them type-safe.

bob1029 • today at 3:30 PM

The tooling and development UX.

Put things like their remote debugging experiences side-by-side and you will quickly learn why some of us go for the Microsoft tools rather than the others.

incidently • today at 2:29 PM

I know it's not quite as important in the agentic world, but the .NET tooling (across Visual Studio, JetBrains Rider, and C# Dev Kit for VS Code) is just awesome. Some people might frown upon full-blown IDEs, but sometimes they're just incredibly handy.

➕ show 1 reply
pjmlp • today at 2:27 PM

That is an urban myth, CLR was designed with support for C++ in mind.

Also Go is at the stage of C# .NET 2.0, and still plenty of lacking language features.

I really think the creator of C# made a disservice to the .NET community by picking Go for the Typescript rewrite.

stackskipton • today at 3:15 PM

At former jobs, because people know it and switching from .Net <-> Go generally isn't worth the time to learn other language.

Sure, having a runtime is downside but difference in container size for your average CRUD App doesn't really matter. Performance IME is very similar.

Ops type here.

i_s • today at 2:18 PM

Native interop is much better in .NET, that matters a lot for some systems.

pjc50 • today at 3:07 PM

What's go's equivalent of LINQ?