Re:Astonishing Performance of .NET 5
by zzbzq on Thursday November 12, 2020 @10:40AM
(#25071002)
Unit tests don't do anything to validate the existence of DI. Most people don't even use DI in their tests. DI is just spaghetti code.
The main thing holding C# back is the culture around the DI and weird hostbuilder code associated with ASPNET. If you just skip that part, it's great. Unfortunately a lot of web examples, solutions, and code libraries themselves are ASPNET-focused, and more and more of the code becomes some truly bizarre, unreadable framework injection in an inside-out fluent builder.
Re:Astonishing Performance of .NET 5
by legulere on Thursday November 12, 2020 @02:48PM
(#25074046)
Do you mean DI (dependencies being added through the constructor abstracted by an interface) or DI Containers (magic code that magically creates objects for you)?
The main thing holding C# back is the culture around the DI and weird hostbuilder code associated with ASPNET. If you just skip that part, it's great. Unfortunately a lot of web examples, solutions, and code libraries themselves are ASPNET-focused, and more and more of the code becomes some truly bizarre, unreadable framework injection in an inside-out fluent builder.