3 ms·
Static Typing [...] other languages, such as Scala and Haskell, offer some form of type inference Okay, so Java has the var keyword, which does type inference
by tmtvl 4y ago
Static Typing [...] other languages, such as Scala and Haskell, offer some form of type inference
Okay, so Java has the var keyword, which does type inference and has been around since version 10 (4 years now). And it's not like people don't like statically typed languages... ever heard of a little thing called Rust?
Also, as has been mentioned, getters and setters were fixed through the introduction of Records in Java 14 (2 years ago).
The example code for exceptions is kind of weird, as the author mentions the throws list, but doesn't have any throws declarations in there; and in try catch you can just catch Exception ex to have a default handler. And it wouldn't make sense to complain about having to catch new exceptions if you want to handle those exceptions separately. In fact it doesn't make sense to blame Java for breaking API changes, those can happen in any language.
- mrkeen 4y ago'var' has nothing on a proper type inference system.