4 ms·
Nice - I wish .NET would be more willing to condemn chunks of the standard library and replace them with something better!
by Smaug123 2y ago
Nice - I wish .NET would be more willing to condemn chunks of the standard library and replace them with something better!
- akira2501 2y agoThat's precisely what I was thinking when I was reading this. The go module transition was not awesome, but if the result is being able to "step" the standard library forward like this without a corresponding major language release, then I take back all the bad things I ever said about it.
- parhamn 2y agoWhat this have to do with go modules? Any standard lib should have the ability add a new builtin module under a different namespace regardless of how third-party packages of managed, right?
- lowmagnet 2y agoThe standard lib was considered core code and to make even the smallest change can have a huge impact. It was more a matter of, "if we're going to do a v2 language, what would we fix?" And, as it turns out this required no regression of existing core language code.
- oneepic 2y agoNot the same, but I wanted to say that when I was upgrading apps from .NET Framework to Core and above, I was surprised how many Framework packages not only had upgrades, but were deprecated entirely and replaced by a new package. We had a difficult time migrating. (This was at MSFT btw)
- tempest_ 2y agoRust has rand in a separate crate which felt weird at first but makes sense for reasons like this thread.
- josephg 2y agoYeah. "Why should / shouldn't code be put in the standard library" is a really interesting question that I think people don't think about enough. I think a lot of the benefit of putting stuff in the standard library is interoperability. It seems obvious but - having a string and list type in std means you can pass strings and lists between packages. I think a lot of standard stuff that acts as "glue" should be in std. For example, in nodejs the standard library includes HTTP request and response types because of how useful they are in their ecosystem. Notably, unlike swift, rust doesn't have an "inlined string" type in std. There's a lot of crates that implement small strings, but most interfaces that need to pass an actual string buffer use std::String - and thats way less efficient. (Thankfully, &str is more common at interface boundaries). Rust also doesn't have much support for futures in std - which upsets a lot of people, because tokio ends up being included by a lot of programs. Anyway, when it comes to crates like rand where interoperability isn't important, I think its fine to keep this stuff out of std. Code can evolve much more easily when it lives as a 3rd party library.
- giancarlostoro 2y agoAt least .NET is very capable of allowing you to support third party libraries. Heck, even ASP .NET Core isn't built-in anymore, you get it through NuGet. So you're not stuck with the standard libraries.
- wiseowise 2y ago“Don’t you guys have internet?” What happened to batteries-included support?
- giancarlostoro 2y agoASP isnt included OOTB anymore, so if you want to do web dev in .NET you have to install it, they decoupled a ton of things from the core of the language.
- neonsunset 2y agoYou don’t get it through NuGet. You get it by specifying the sdk type in the project. https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview https://learn.microsoft.com/en-us/dotnet/core/project-sdk/ov...
- giancarlostoro 2y agoUsed to be this way for .NET Core, I guess with modern .NET they changed it? https://www.nuget.org/profiles/aspnet https://www.nuget.org/profiles/aspnet Some projects listed were last updated in 2022.
- metaltyphoon 2y agoASP comes included in SDK. All you need is to specify in the csproj that you want a Web project
- Smaug123 2y agoBut when you're replacing, like, much of the standard library, you have to be a bit sad about all the interop work that falls on the user. It should instead fall on the makers of the bad standard library.