3 ms·
What I mean is that the code var a = f(x) var b = g(y, a) Isn't any different from: g(y, f(x)) A lot of real world code I encounter doesn't bother with temp
by nv-vn 7y ago
What I mean is that the code
var a = f(x)
var b = g(y, a)
Isn't any different from:
g(y, f(x))
A lot of real world code I encounter doesn't bother with temporary values for everything and giving them explicit types, which is essentially the equivalent of just using inference here. Thus in this case inference isn't doing anything negative because the code would look like that regardless.