Re:JEP 286: Local-Variable Type Inference
by djsumdog on Thursday March 10, 2016 @03:28PM
(#11262024)
Hey look, it's something else that's been implemented in almost every other JVM language that hasn't made it into Java yet.
[ Parent
| on HN ]
Being conservative about what you add to the language is a feature, not a bug. Not all languages need to be on the cutting edge (even if I personally prefer the languages that are)
See Brian Goetz's talk on language stewardship (https://www.youtube.com/watch?v=2y5Pv4yN0b0). I'm sure nobody wants to add new and interesting features to Java more than the people who work on the language every damn day, but they've made a strong commitment to the community to not break existing code.
C# shows pretty compellingly that adding features does not have to break existing code. For example, you can use every keyword added after 1.0 as identifier, too.
Re:JEP 286: Local-Variable Type Inference
by SideburnsOfDoom on Thursday March 10, 2016 @04:27PM
(#11262498)
But it can make things more complex too. e.g. I recently learned that the main reason that asynchronous C# methods have to be declared "async" is so that the compiler knows that in the method body, "await" is a keyword. Without this backward compatibility requirement, it could be inferred from the return type + the presence of 1 or more "await" keywords.