Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
typ
· 1y ago · 0 comments
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.
Comments
[–]
fabian2k
1y ago
C# can create single-binary executables, even without native AOT.
[–]
cardanome
1y ago
They are still going to significant bigger than the equivalent golang binary because of the huge .NET runtime, no?
[–]
zigzag312
1y ago
https://github.com/MichalStrehovsky/sizegame
C#: 945 kB
Go: 2174 kB
[–]
ricardobeat
1y ago
Is this a fair comparison, won't doing anything more significant than `print` in C# require a .NET framework to be installed (200MB+)?
[–]
xarope
1y ago
Since this is just Hello World, then TinyGo: 644kB
[–]
Rapzid
1y ago
Yeah and I doubt many people care if the TS compiler is 200MB anyway LOL. It's 2025.
[–]
fabian2k
1y ago
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.
[–]
pjmlp
1y ago
You can choose how the linking process is done, just like you can chose to have a a Go binary with dependencies.
[–]
SkiFire13
1y ago
C# has an option to publish to a single self-contained file.
[–]
osigurdson
1y ago
It would be big enough that people would find it annoying (unless using AOT which is hard).