Hacker News new | ask | show | jobs
by sfn42 20 days ago
I think C# would be a great choice for both CLI apps and server less functions.

Other than that I totally agree with everything you said.

1 comments

    > I think C# would be a great choice for both CLI apps and server less functions.
Really? I feel those are the two areas where it falls short. CLI apps and serverless both value cold starts and C# is not great at it because of the JIT overhead. The immaturity of NativeAOT ecosystem on C# was cited by Anders as one of the reasons the TS team chose to rewrite in Go.
.NET has a pretty good AOT compiler since .NET 8

https://learn.microsoft.com/en-us/dotnet/core/deploying/nati...

I write all my CLI apps in C#, but I hear you on the startup time. I guess it depends what you are working on whether that little hiccup is a problem. I've never once noticed it with anything I've written.
I’d be curious whether a CLI app written in C# would compare to one in Python for startup time. Python isn’t exactly a speed demon, but I use it constantly.

I may have to play with F# for that.

I think by CLI apps they mean something more like Claude Code than ripgrep.