3 ms·
Would type-inference also "screw up the semantics"? My understanding is that this generally operates via some kind of constraints solving.
by nicoburns 3y ago
Would type-inference also "screw up the semantics"? My understanding is that this generally operates via some kind of constraints solving.
- orthoxerox 3y agoDepends on how much type inference you want. If you want ML-style total type inference when you expect the compiler to deduce the parameter and the return types of your functions, then yes. Local variable type inference isn't hard at all, unless you want to do stuff like Rust: declare a variable without an initial value and infer its type from the first assignment downcode.