4 ms·
People like to bring this example up in .NET world. The usual recommendation is to actually have a type on the left hand side, if the right hand side is a funct
by jimbobimbo 11y ago
People like to bring this example up in .NET world. The usual recommendation is to actually have a type on the left hand side, if the right hand side is a function call.
int result = doSomething();
but
var result = new Dictionary<string, int>();
Type inference really shines once you get into evolved lambdas and generics.