|
|
|
|
|
by Animats
1065 days ago
|
|
Programming seems to be settling down in this area. Parameters to functions and fields in data structures are usually explicitly typed, while local variable types are inferred when possible. C++, Go, and Rust have all converged on this. C++ used to suffer from "for" loops with insanely long type declarations for iterator variables. "auto" fixed that. Inter-function type inference, while technically possible, is just too confusing for people reading the code. So that went away. Mostly, type inference is now forward only. Inverse type inference through long chains is, again, possible but too confusing. Explicit typing of structure fields and function parameters allows automatic generation of reasonably useful documentation. That gives programmers anchor points at which they can see types. So this has become a solved problem for compiled languages. |
|