Hacker News new | ask | show | jobs
by goto11 927 days ago
It is still type inference though. If 2 is an int, the compiler perform type inference to figure out that the expression 2 + 2 is also an int. It is just that traditional languages only use type inference for expressions, not declarations.
1 comments

It's type propagation. Which can be seen as a form of inference or not, depending just where you draw the line.
So is auto, decltype and templates. In C++ we properly call it type deduction to distinguish it from actual H-M style inference which C++ lacks. The details of how it is called doesn't detract from parent's argument.
Yes. I hadn't meant my comment as argument on either side, just added context.