I'm not sure whether we're talking about the same thing, but you can publish Self-Contained App (basically your app and framework together) and you don't have to install anything.
Don't get me wrong, I totally love 4k and 64k demos and am always fascinated what could be packed into such small binaries, but in my professional life I think developer productivity, code quality and tooling is way more important than filesize. This is of course different if you are a webdev that ships .js, or an App developer publishing to Appstores.
Running this command:
dotnet publish `
-p:Configuration=Release `
-p:PublishSingleFile=true `
-p:PublishTrimmed=true `
-p:RuntimeIdentifier=win-x64
gives an 11 MB file, that still requires 4 DLL as well.Things like
var filtered = purchases.Where(x => x.Name.Contains("Sean"));
and var grouped = purchases.GroupBy(x => x.Buyer).Where(x => x.ToList().Count > 10).ToDictionary(x => x.Buyer, x => x.ToList());
etc. come up a lot in day to day programming and always feel tedious to me in go. The first example in go looks something like filtered := []purchase{}
for i := range purchases {
if purchases[i].buyer == "Sean" {
filtered = append(filtered, purchases[i])
}
}
and it only gets worse as the domain gets more complicated. I don't really know what your background is where you feel that static typing and generics are complicated. I write C# every day and spend 0% of my time fighting the language.I like Go for services that just need to push bytes around to various places but otherwise it does get quite tedious for complex logic.
It's not that those aren't also complex, but there's less "business" in the logic, if that makes sense. Something that doesn't handle arbitrary user input or deal with the messiness of humans, like first/last names, dates and timezones, etc.
As an example, I had once written a WebSocket server in go which took a program as input, ran it in a heavily stripped down docker container, and streamed the stdout back to the client. Go was perfect for that use case. (though to be honest I'd pick Rust now because I'm past the learning curve on it)
In what capacity are you using Go that made it a good replacement for C#? Microservices? If so, which framework are you using?
And also I don't have to fight against the language to do what I want to do ... No classes, no types, no constraints.
Well, do you have all of the bells an whistles that you had with .NET? I mean, you can shrink a .NET API down to pretty much just 1 file if you really want to. The question is if you should.
WebHost.CreateDefaultBuilder().Configure(app => app.Run(c => c.Response.WriteAsync("Hello world!"))).Build().Run();
that's giant, but I don't think that "just" language / environment difference makes this huge difference