3 ms·
Probably because they don't know it's useless. I use and like C#. The type inference seems useful to me. Avoiding generic parameters on almost every linq ext
by recursive 13y ago
Probably because they don't know it's useless. I use and like C#. The type inference seems useful to me. Avoiding generic parameters on almost every linq extension method is a huge savings in comprehensibility. var x = new SuperDuperLongClassName(); is a nice savings in redundancy.
Where can I see an example of useful type inference?
- MichaelGG 13y agoOff the top of my head, C# can't type infer: Fields, properties, parameters, return types, lambdas, generic type declarations, type constraints. I did a pretty fair line-by-line translation of a C# app to F#, and the F# version needed 1/20th the number of type annotations.