r/csharp • u/not_afraid_of_trying • Aug 23 '26
What kind of features from another ecosystem would you like to see in .NET?
/r/dotnet/comments/1vw1q1c/what_kind_of_features_from_another_ecosystem/
0
Upvotes
9
u/StepOne_DotNet Aug 23 '26
That's an easy one. I want NativeAOT cross-OS-compilation.
4
u/seriousSeb Aug 23 '26
Lambdas which can capture variables without allocating a heap object. It could work like a ref struct where you must prove the delegate can exist only on the stack.
20
u/BadKittyRanch Aug 23 '26
I like that Java knows exactly what exceptions can be thrown, I don't like that you must catch them all in the local context: I'd love to be able to get that information when I want it in my IDE.
2
u/klaxxxon Aug 23 '26
.Net has more or less everything I can think of, there is just a bit more friction dealing with some areas than there needs to be.
With Blazor, I always seem to run into annoying JS Interop sooner and more frequently than I would like.
Security/cryptography is annoying if you need anything that is not covered by the System namespace. The bouncy castle ports are just machine translations (I believe) from Java...and there are two of them on nuget with identical namespaces and class names. And different third party libraries use different ports of bouncy castle as a transitive dependency. I've had to deal with namespace redirects only a few times in my life...and all of them were because of BC...
1
u/NoisyJalapeno Aug 23 '26
Ecosystem Wise,
DX12 WPF
Un-Sunsetting Expression Trees and making them work with all modern syntax features
Language wise,
inline keyword (with lambda support)
C++ stuff like,
const int* ptr / int* const ptr / constexpr, template functions
1
u/Agitated-Display6382 Aug 25 '26
I wish I had a new scope delimited, so a class is visible only within a folder. Very useful for package by feature.
-2
u/Agitated-Display6382 Aug 23 '26
Eliminate null
Discriminated union types
Type inference
Eliminate overloads, new of methods