Hacker News new | past | comments | ask | show | jobs | submit login

I find the discussion about the choice quite interesting, and many points are very convincing (like the GC one). But I am a bit confused about the comparison between Go and C#. Both should meet most of the criteria like GC, control over memory layout/allocation and good support for concurrency. I'm curious what the weaknesses of C# for this particular use case were that lead to the decision for Go.



Anders is answering this in the Video. Go is the lower level and also closer to Javascript's programming style. They didn't want to fully object oriented for this project.


C# is fine. But last I checked, the AOT compilation generates a bunch of .dll files, which are not suitable for a CLI program like Go's zero dependencies binary.


C# can create single-binary executables, even without native AOT.


They are still going to significant bigger than the equivalent golang binary because of the huge .NET runtime, no?



Is this a fair comparison, won't doing anything more significant than `print` in C# require a .NET framework to be installed (200MB+)?


No. This is normal native compilation mode. As you reference more features from either the standard library or the dependencies, the size of the binary will grow (sometimes marginally, sometimes substantially if you are heavily using struct generics with virtual members), but on average it should be more scalable than Go’s compilation model. Even JIT-based single-file binaries, with trimming, take about ~13-40 MB depending on the task. The runtime itself AFAIK, if installed separately, is below 100MB (installing full SDK takes more space, which is a given).


Spending ages slamming your head on your keyboard because you get a dll error or similar running a .NET app and just can't find the correct runtime version / download is a great past time.

then when you find the correct version but you then have to install both the x86 and x64 version because the first one you installed doesn't work

yeh, great ecosystem

at least a Go binary runs 99.99999% of the time when you start it.


Since this is just Hello World, then TinyGo: 644kB


Yeah and I doubt many people care if the TS compiler is 200MB anyway LOL. It's 2025.


Depends on how well trimming works. It's probably still larger than Go even with trimming, but Go also has a runtime and won't produce tiny binaries.


You can choose how the linking process is done, just like you can chose to have a a Go binary with dependencies.


C# has an option to publish to a single self-contained file.


It would be big enough that people would find it annoying (unless using AOT which is hard).




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

Search: