Introduction
Type inference helps the computer guess the type of a value automatically. This makes your code shorter and easier to read.
When you want to write cleaner code without repeating types.
When the type of a value is obvious from the value itself.
When you want the compiler to help catch type mistakes early.
When you want to avoid cluttering your code with extra type information.