Live data from Hacker News

.NET 5.0

devblogs.microsoft.com

241–250 of 466 posts

Re: .NET 5.0

#241

Does anybody knows if .NET 5.0 will be included in Windows as a Windows Update as the .NET Framework ?

It won't be. .NET Framework is an embedded component of Windows. .NET Core is something apps have to package along with them. (Due to this, .NET Core apps are larger than .NET Framework apps, but tend to have less compatibility issues in theory, since they bring everything they need with them.)

.NET Core apps don't have to package the framework. They can also require it to be installed separately, although it's still not an OS component in that case.

https://docs.microsoft.com/en-us/dotnet/core/deploying/#publ...

Re: .NET 5.0

#242

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

Completely do away with dependency injection by using one of the many available F# options, for instance SAFE stack.

Should be able to likewise give you a much simpler and understandable config model.

https://safe-stack.github.io/

Re: .NET 5.0

#243

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

> My biggest bugbear is the way you access your config, which is an absolute and utter kafka-esque mess. Because someone at MS was drinking the DI kool-aid you have to add a minimum of 5 lines of code to any class you want to access config values in I'm not sure if maybe you're referring to the Options stuff? The way I do it is pretty simple. 1. Create a POCO that represents your config. You can have properties for b…

+1 This is the approach I use, to register a config interface in the DI, just grab IConfiguration and bind it to a config class.

The options stuff is a car crash.

Re: .NET 5.0

#244

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

I can get behind the DI dislike, but how are callbacks and promises in nodejs better than async in .NET?

If you're writing modern nodeJS you're probably not using callbacks or promises (directly) anymore (or using promises a lot less than you used to - Promise.all and Promise.allSettled is about it for me, and that's not that often).

The async/await syntax is where it's at. Honestly it's a massive improvement over promises, which I hated reasoning about almost as much as callbacks :)

Re: .NET 5.0

#245

Earlier quoted context omitted.

>and you're in for an even bigger nightmare if you want to separate business logic and web code into two projects (which is a pretty common design). I've given up with the config DI and just assign them all to static variables. So you have static variable in web project and then add reference to web project to obtain that config? Do I get that right? I never felt like config DI was a problem once you did all the stuf…

To me it's just so pointless, here's an example: using Microsoft.Extensions.Configuration; //extra line using Microsoft.Extensions.Options; //extra line public class AdminController : Controller { IOptions settings; //extra line public AdminController(IOptions settings) //extra code { this.settings = settings; //extra line } public void RandomMethod() { var a = settings.Value.FinallyMySetting; // 5 extra lines to acc…

THe last time I used .net core and had to handle some config was a nightmare like you describe. The documentation wasn't great either. The whole way everything is complicated and messy made me want to just quit my job.

It's such convoluted nonsense.

I like C# but sometimes it feels like MS main aim is to make developers miserable.

Re: .NET 5.0

#246
post #203

Earlier quoted context omitted.

> Why would we want that to be synchronous? Authentication is blocked by accessing storage. You cannot proceed until the storage read operation is completed. There is no parallel work to be accomplished here. This isn't UI code. There's no event loop. Why would you want this to be asynchronous? This seems like async as a dogma, rather than as a tool to accomplish something specific.

> There is no parallel work to be accomplished here. Concurrency is not parallelism [1]. [1]: https://blog.golang.org/waza-talk

Each HTTP request in a Go webserver spawns a goroutine, and there is no need to think about "freeing up threads" since coroutines are not OS threads. There's also no need to leak the word `async` all over your codebase. The problem being solved here with async/await is also being caused by async/await.

Re: .NET 5.0

#247
post #83

Earlier quoted context omitted.

It won't be. .NET Framework is an embedded component of Windows. .NET Core is something apps have to package along with them. (Due to this, .NET Core apps are larger than .NET Framework apps, but tend to have less compatibility issues in theory, since they bring everything they need with them.)

Are you sure it will not be distributed with Windows? Is 4.8 the last version being distributed with Windows, requiring all future .NET framework versions to be packaged with the apps?

Yeah, .NET Framework will see no new features, so they'll continue to patch bugs in 4.8 probably for over a decade to come, and a lot of new apps will just not use it, and include .NET Core runtime instead.

Re: .NET 5.0

#248
post #83

Earlier quoted context omitted.

Are you sure it will not be distributed with Windows? Is 4.8 the last version being distributed with Windows, requiring all future .NET framework versions to be packaged with the apps?

The idea is that its installed separately from windows, in the same way one might install java. So because you can have mutiple versions installed, or you can package it with an app , then the updates can be more rapid. The problem with .Net framework is that everything, including system services rely on it - that means it needs years of testing and can't have any breaking changes. Basically they decided that packagi…

I feel their mistake was not allowing apps to call a specific version if needbe, not with the general decision to include it in Windows.

While .NET Framework updates annoyingly force every app to use it, I expect .NET Core to make it super difficult to secure apps that decided to hardcode some specific ancient release of it and allow no way to override it.

Re: .NET 5.0

#249
post #44
post #18

As someone who uses .NET daily, but loves Clojure and other functional programming paradigms - Records seem like a very compelling feature. Immutable data structures without any hassle to set up. Simply write “record” where you would normally write “class” and boom, you are working with immutable objects. This is one step closer to one the best features of Clojure IMO -everything is immutable. Additionally, there see…

You probably know, but F# exists if you want a functional language in the .NET ecosystem. Granted, you end up dealing with a bunch of OOP libraries still since .NET is very C#-centered, but the language is pretty good and the integration is painless.

My experience with F# over 7 years of production coding is for most needs there is already an F# .NET library or wrapper over an OO library. It's mostly only very specialized needs that drive me to an OO .NET library.

Re: .NET 5.0

#250

One day I would really like to see the ability to have C#, F# and other languages all in the same project.

That will be a stretch, since they require different compilers. C# and F# projects in the same solution not good enough?
Post reply on HN