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

With WinForms you can do much better, in large part because .NET itself ships with Windows and thus the app can just rely on it being there, but also because C# compiles to bytecode rather than native code (so it's not exactly a fair comparison). Anyway, the identical hello world GUI app in C#/WinForms is ~11 Kb.

With Gtk, no, because it implements all widgets by itself rather than wrapping Win32, so it'll necessarily be larger. Also, statically linking it can be a pain (and AFAIK isn't even supported in Gtk 4 anymore).






Even if C# compiles to bytecode, NGEN has been part of the framework since version 1.0, although using strong named assemblies might be bit of a pain.

Then there is .NET Native and Native AOT.


You couldn't redistribute NGen'd binaries tho, it was basically a local AOT'd cache.

As far as Native AOT, last I checked it requires trimming which breaks WinForms (and WPF) according to the official docs.

I don't think this matters much, though. There's simply no practical reason to AOT-compile a WinForms app. Not when the framework is guaranteed to be there, and JIT compiler is plenty fast.




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

Search: