4 ms·
C# operates entirely differently, I understand. The IDE work is massive and necessary. Having said that, a lot of this stuff is "catching up" or implementing st
by MichaelGG 13y ago
C# operates entirely differently, I understand. The IDE work is massive and necessary. Having said that, a lot of this stuff is "catching up" or implementing stuff from the 70s. To be clear, it's not like type inference or closures were invented with Haskell, F#, or C#. Stuff like that is pretty well-known PL stuff, isn't it?
People would be upset if C# didn't have for loops; why aren't they upset the type inference is nearly useless?
- recursive 13y agoProbably 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.
- pjmlp 13y ago> People would be upset if C# didn't have for loops; why aren't they upset the type inference is nearly useless? Because the existing type inference is good enough for the average enterprise programmer. You know, those guys with good enough CS grades, that just do what they are told and don't even know HN exists.
- recursive 13y agoIt's also good enough for some of us that do know HN exists.
- deleted 13y ago[deleted]
- mehwoot 13y agoPeople would be upset if C# didn't have for loops; why aren't they upset the type inference is nearly useless? Can you honestly not comprehend the answer to this? There are plenty of languages without type inference and shit gets done fine. People don't rely on it. People do rely on for loops.