2 ms·
C# has local type inference, and is getting a bit better in type parameter inference in the next version. The languages with strong type inference (say OCaml o
by seanmcdirmid 12y ago
C# has local type inference, and is getting a bit better in type parameter inference in the next version.
The languages with strong type inference (say OCaml or Haskell) provide less in the form of tooling like autocompletion either through neglect (their communities don't demand it) or design limitations in Hindley Milner (mostly algebraic and structural, poor support for nominal typing where code completion menus begin to make more sense in ways that we currently understand them). Scala would be in the sweet spot of a well tooled statically typed language if the IDE situation could ever be straightened out enough.
> For functions with sufficiently rich types, there are often only a couple ways to implement the function.
That is only kind of true in pure function land. Any kind of state manipulation, even though monads with powerful dependent typing, drastically opens up how a function can be implemented.
- pcwalton 12y ago> That is only kind of true only pure function land. More than that: it's only true in total pure function land. Admitting divergence explodes the state space of functions.
- dllthomas 12y agoStrictly, yes. However, most of the time this bites less hard than it might, because most of the non-total implementations are obviously wrong where we intend a total function. It still can bite, of course, and I've been meaning to play around in some total languages (or languages with a compiler-enforced total subset).