Hacker News new | ask | show | jobs
by Rohansi 74 days ago
> If they could make the developer experience similar to Go, it would rule the world...

You can already AOT compile .NET software to an executable to run on whichever platform you need, just like Go.

Libraries need to be published into a package manager (NuGet) which is more friction than just importing from Git repos but it's not that bad.

2 comments

AOT is not a panacea and comes with some restrictions/trade-offs that need understood before depending on it in production.
You also have the option to do single file deployment where it self-extracts the runtime when you run it. It's not as nice but it works and maintains full compatibility.
While that is nice it’s not AOT, is it?
Yes, but it's still a single-file deployment option that can easily cross-compile. Just with slower startups.
Losing dynamic PGO by using AOT compilation could be a detriment to performance in long-running applications, right?
wouldn't you have the same restrictions/tradeoffs using go (or other compiled languages)?

I've never used go, am curious

Pretty much, yes. For example reflection is severely limited in .NET AOT vs. JIT, runtime generated code is more common than you'd think and cannot be done AOT. Go was designed for AOT so they already built everything around the limitations because it never supported more.

It'll just take time for .NET to catch up where the dependencies you need automatically work with AOT builds.

shaddap