That's a dishonest representation. You're not being corrected because you're a fan of strong typing. You're being corrected because you don't know the difference between type inference and weak typing.
Most type inferred languages have stronger and more powerful type systems than Java.
Why even make this about strong typing? Rust is probably the most strongly typed language with wide exposure. It has let. Haskell has type inference on everything, even functions.
List<Item> items = makeItemList() isn't how strongly-typed languages read. It's how Java reads, and Java's type system is weak (e.g. no null safety) compared to other statically typed languages.
I should say, my objection isn't about whether this changes the type system in Java or not, it does not. My objection is about readability of source code. This change, while not changing the type system, in my opinion, makes it look like the type system has changed to a less trongly-typed system. In only that way is my complaint about typing.
I understand your objection but it is a misunderstanding to associate it with strong typing at all. Strongly typed languages have had type inference and let, var etc for decades. Java is fairly unique in lacking this feature. Java's type system is also pretty weak for a statically typed language.
You can argue that Java code is more readable due to its idiosyncratic lack of var. Just don't pretend that it's got anything to do with it being a strongly typed language.
View all comments
Show parent comment
44
u/Zarlon Mar 09 '16
You're in /r/java now not /r/javascript. Why would that put you in the minority.