Earlier quoted context omitted.
> terrible ecosystem .NET is a fantastic ecosystem. Has a decent build and dependency system (NuGet, dotnet run/build, declarative builds in XML). Massive standard library, with a consistent and wide focus on correctness, ergonomics, and performance across the board. You can write everything in many languages, all on the same runtime: business logic in C#; hot paths interfacing with native libraries in C++/CLI; shell…
I work with C#/NuGet on windows every day and my experience is entirely the opposite. The build and dependency systems are an abysmal esoteric, poorly documented mix between csproj files, sln files, random scattered json files, etc. The standard library in my experience sucks and has all sorts of issues, especially around Uris, DateTimes, etc. And the ecosystem itself has such a low quality bar, ironically _especiall…
Union types in C# 15
211–215 of 215 posts
Re: Union types in C# 15
#212Earlier quoted context omitted.
This is the general pattern of how the C# team operates, IME. "Never let perfect be the enemy of good" Very much what I've seen from them over the years as they iterate and improve features and propagate it through the platform. AOT as an example; they ship the feature first and then incrementally move first party packages over to support it. Runtime `async` is another example.
In the meantime I still haven't done any project with nullable references, because the ecosystem has yet to move along. Same applies to ValueTask for async code.
Re: Union types in C# 15
#213Earlier quoted context omitted.
In the meantime I still haven't done any project with nullable references, because the ecosystem has yet to move along. Same applies to ValueTask for async code.
Which part of the ecosystem is blocking your projects from using nullable references? I find them very helpful, but the projects were all newer or migrated to new SDK.
It is relatively easy to find corporate libraries, or commercial products that still aren't using it, including Microsoft products still stuck in .NET Framework, or .NET standard 2.0.
If you want name shaming of commercial products with modern .NET, here is one, can provide more.
Re: Union types in C# 15
#214Earlier quoted context omitted.
FYI small string optimizations are generally implemented using unions.
In Rust? The two I'm big fans of, CompactString and ColdString do not use unions although historically CompactString did so and it still has a dependency on smallvec's union feature ColdString is easier to explain, the whole trick here is the "Maybe this isn't a pointer?" trick, ColdString might be a single raw pointer onto your heap with the rest of the data structure at the far end of the pointer, this case is expe…
Re: Union types in C# 15
#215Earlier quoted context omitted.
Which part of the ecosystem is blocking your projects from using nullable references? I find them very helpful, but the projects were all newer or migrated to new SDK.
What all projects? It is relatively easy to find corporate libraries, or commercial products that still aren't using it, including Microsoft products still stuck in .NET Framework, or .NET standard 2.0. If you want name shaming of commercial products with modern .NET, here is one, can provide more. https://github.com/episerver/content-templates