3 ms·
That would still fall under the umbrella of "type inference" If you want to learn more about this, the Damas Milner unification-based algorithm used in ML, Has
by ufo 9y ago
That would still fall under the umbrella of "type inference"
If you want to learn more about this, the Damas Milner unification-based algorithm used in ML, Haskell and others is a must-read starting point. It does global type inference of all types in the program without requiring any annotations, by analyzing how the types are used. It also can detect when a variable is only passed around, without being used in primitive operations, in which case it infers a generic/parametric type for it.