2 ms·
Personally, while I strictly use dynamically-typed languages and wouldn't want to do all that typecast typing in Java, I still use type hints for the IDE—in PHP
by aasasd 8y ago
Personally, while I strictly use dynamically-typed languages and wouldn't want to do all that typecast typing in Java, I still use type hints for the IDE—in PHP, Python and JS. Because hints give valuable information and enable IDE features that can be directly used by me in my work, as opposed to typecasts which make me toil for the compiler.
So for me, the divide is that the tools shouldn't make me do work that they can do themselves, namely type inference. And I'm baffled that Java people just outright decided they don't want type inference. They chose to type things that the computer can calculate for them! It makes no sense.
Granted, the usefulness of the work I still choose to do scales with the longevity and involvedness of the code, so I dump hints in scripts that will live for half an hour.
- Floegipoky 8y agoJava already had limited generic type inference, and 10 just introduced local variable type inference: https://developer.oracle.com/java/jdk-10-local-variable-type-inference https://developer.oracle.com/java/jdk-10-local-variable-type... That being said the only thing I've run on jre10 so far has been Scala, so ymmv.