(no title)
pents90 | 8 years ago
Type inference already happens for you when you are using a good IDE, like IntelliJ IDEA. You can just use the "Introduce Variable" refactoring. And better yet, it self-documents your code with the variable's type.
pents90 | 8 years ago
Type inference already happens for you when you are using a good IDE, like IntelliJ IDEA. You can just use the "Introduce Variable" refactoring. And better yet, it self-documents your code with the variable's type.
pwaivers|8 years ago
Maybe it is because we are used to our own paradigms, but the following is no less readable to me because of inference. And these are the 95% of cases.
> more bugsI have never seen a bug arise because of type inference. Do you have an example?
> unnecessary burden on the compiler
The compiler does a lot of work and this would probably be insignificant to add to it. However, I am totally open to learning more about this.
kentosi|8 years ago
*Edit: I'm absolutely a fan of the var syntax, having dabbled with scala. I'm just expressing what I think the original author's complaint is.
meandmycode|8 years ago
saosebastiao|8 years ago
If you really want to know what a type is resolved to, you have both compilers and IDEs there to tell you. Relying on an IDE to write code is just hacking over a weak or broken language.
tormeh|8 years ago
richard_todd|8 years ago
tormeh|8 years ago
coldtea|8 years ago
It is already the case in lots of languages since 1990s and the sky has not fallen...
pacala|8 years ago
nonsince|8 years ago
unknown|8 years ago
[deleted]