Earlier quoted context omitted.
Type inference, at least for variables doesn't really take that much time. In practice almost every language does it, they just don't expose it to the developer. For example you can do this in C: foo->bar()->baz() And the compiler has to get the type for the bar() result. That's one a small step from: let x = foo->bar() Also that dictionary is most likely parsed and assigned a type in the expression whether you speci…
That is way too oversimplified case of type inference. A huge lot of languages don't have this: let x = (f ? makeDerived1() : makeDerived2()); // no error, x is inferred to be Base let x = 1; x *= 2; x = sin(x) / x; // no error, x is inferred to be Float The problem is not just that extra computation is needed, it's language design. For example, you probably do not expect a dictionary of Floats and a zero to be a dic…
And yes, the next example does need backtracking. I agree that it does need extra work in some cases. Most of the time though it's a very straightforward process.