2 ms·
Is it really? Class-based single dispatch OO with strictly explicit static typing—no gradual or optional or even Hindley-Milner type inference—is about as 90s a
by StefanKarpinski 7y ago
Is it really? Class-based single dispatch OO with strictly explicit static typing—no gradual or optional or even Hindley-Milner type inference—is about as 90s a language design as there is. It’s like the “Friends” of PL designs. Which is to say, very popular and not bad, but certainly not modern or cutting edge.
- SigmundA 7y agoC# supports multi-dispatch and gradual typing using the dynamic keyword since 4.0. It also does some type inference using var, but not full HM.
- coldtea 7y agoI didn't say "cutting edge" though, I said modern. Modern is not some "PL-community favorite with small following" a la Haskell, it's what programmers in the trenches are using. The same way a modern car is (pick a popular current model) and not some limited edition car with limited sales. C# "keeps up with the Joneses", brings in ideas from functional programming (bringing in F# features incrementally), etc. LINQ, pattern matching, dynamic, value types, tuples, destructuring, async/await, null-coalescing operators/assignment, streams, and much more... Not only is up there with any popular language in the same domain (Swift, Kotlin, etc), and way ahead of Java, but compared to something like Go that gets people excited this is space technology. (Plus is not like multiple dispatch is a new development, or gradual/optional typing is the "new" thing - we had those things for decades, and I don't see them catching on except the latter where necessary - e.g. adding gradual typing in JS/Python/etc variants like TS, where they can't have strict static typing for compatibility/historical reasons. The only language with gradual typing I remember in recent times was not very cutting-edge itself, Dart, and didn't manage to go anywhere).