News for hackers. Stuff that matters.
Re:Astonishing Performance of .NET 5 by oaiey on Thursday November 12, 2020 @08:04AM (#25069390)
Regards ceremony and DI: I think the templates are more Ruby on Rails style while the framework can be trimmed down to nodejs + express simplicity. This sample here is node+express like equivalent (thanks to C# 9.0 top level statements, there is not even a Program class and a Main entry point)

    WebHost.CreateDefaultBuilder().Configure(app => 
    {
        app.UseRouting();
        app.UseEndpoints(e => 
        {
            e.MapGet("/", c => c.Response.WriteAsync("Hello world!"));
            e.MapGet("hello/{name}", c => c.Response.WriteAsync($"Hello, {c.Request.RouteValues["name"]}"));
        });
    }).Build().Run();
I also stumble over that once in a while but I have no hard feeling on it.
Re:Astonishing Performance of .NET 5 by oaiey on Thursday November 19, 2020 @04:11AM (#25147642)
This here is the official answer of the Architect of .NET David Fowler (with a full TODO use case):

https://github.com/davidfowl/Todos/blob/master/TodoBasic/Pro...