Re:.NET 5.0
by littlecranky67 on Tuesday November 10, 2020 @02:57PM
(#25050962)
Every rewrite yields better results, even if you'd have rewritten your code in (modern) C# again.
> my code is now 20x times shorter (from 800 files to 40 files)
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();
>20x times shorter
that's giant, but I don't think that "just" language / environment difference makes this huge difference
I would say 2x-5x shorter is pretty realistic.
Re:.NET 5.0
by balfirevic on Tuesday November 10, 2020 @02:23PM
(#25050398)
I would say that that C# code that can get 2x-5x reduction in size by being rewritten in JS is terribly bloated (not taking into account the case where you just remove code because there is now a library available for what you had to do yourself before).
yeah javascript is pretty short. unfortunatly I do not know how people love it. npm/yarn and javascript dependency management is the worst thing i've ever seen and it is slow and pulls in millions of files, just for a small project.
And also I don't have to fight against the language to do what I want to do ... No classes, no types, no constraints.