Joseph Musser
Joseph Musser
Here's an immediate example I can think of: ```cs var processArguments = [ "pack", "-o", outputPath, ..(configuration is not null ? (["-c", configuration]) : []), "/bl:" + Path.Join(artifactsDir, @"logs\pack.log"), ];
It would have to work for `let x = new List { new MyMutableClass() };` too.
The `List` instance is one heap allocation, and the internal array is a second heap allocation. If the initial capacity is sufficient, there are no additional heap allocations or memory...
@TahirAhmadov Something very much in the spirit of what you just described is being considered: https://github.com/dotnet/runtime/pull/60519
You'd need a separate trie before and after the center case, since the center case makes the switch become order-dependent. Imagine splitting into `if` statements and then back into order-independent...
Allowing static classes to implement interfaces which only have static members, and to be passed as generic type arguments, was first discussed at https://github.com/dotnet/csharplang/issues/4436#issuecomment-946729152. There's also discussion on just the...
@Richiban Unless you make the static class non-static. If I understand right, that's the price we'd pay in order to avoid adding this new way that it would be a...
This is great. By the time I got to the examples, they were already doing everything I intuitively wanted them to be doing. The indentation removal (or lack of indentation...
@ymassad What attribute instance would you expect `typeof(GenericClass).GetMethod("DoSomething").GetCustomAttributes()` to contain in your example?
@ymassad The problem there (if I remember the metadata format correctly) is that attribute arguments of type System.Type are stored as serialized strings containing the assembly-qualified name. What string can...