19 ms·
Collection literals are going to be fantastic. Many don't know that there is actually momentum to keep moving right into Dictionary literals. There is a "roles
by Rapzid 3y ago
Collection literals are going to be fantastic. Many don't know that there is actually momentum to keep moving right into Dictionary literals.
There is a "roles" proposal and investigation team. This roles proposal is going to unlock so much potential it is bonkers.
- melolife 3y agoCollection literals are a pointless extension of the pattern matching syntax added to get around the fact that there is no way to name a generic type in C# without specifying its type arguments. It's yet another double down on object initializers instead of writing constructors and factories, and unlike using a factory you have to fully express the result type of the collection instead of having it inferred (they are "target typed", another feature that probably should not have been added).
- Rapzid 3y agoThere is a pattern matching aspect but I think the energy behind it is largely motivated by a desire to clean up syntax when working with data structure based APIs and DSLs. I've read the proposal, design meeting notes, and GH conversations. Not seeing a compelling counter argument here.