Closed jcmrva closed 2 years ago
True, List<Nothing>
can be optimized to Nothing
. This will require changes to .NET Generics in the C++ of the Common Language Runtime. The code is here if someone wants to make a start https://github.com/dotnet/coreclr
Do include a link to the PR here if you submit one for others to reference.
In the spirit of the project I wrote no code and submitted no PR. I think it handles the issue nicely.
I'd like to use this but I'm concerned about the overhead of creating classes.
If Nothing is truly nothing then shouldn't it be removed at compile time? Otherwise it's technically something.