4 ms·
The point is that the type of a local variable can almost always be inferred based on what it’s assigned to.
by kgilpin 6y ago
The point is that the type of a local variable can almost always be inferred based on what it’s assigned to.
- amw-zero 6y agoWhile that’s true, that’s not what I’m talking about. I’m talking about the communicative benefit of type annotations. If you get the benefit from seeing the types, you don’t want them to be inferred. You use them as a reading tool.