|
|
|
|
|
by ungzd
2963 days ago
|
|
I don't think lack of type inference is the primary reason of un-attractiveness of Java compared to dynamic languages. The main reason is bad expressiveness of java's types itself. You can't even have tuples. Neither tuple-like named types and named records. You have to make class every time, and OOP discipline tells you to hide data in it and make "behavior" public (this approach is definitely not for everything, so "beans" with getters and setters became hugely popular). Ubiquity of hashmaps in dynamic languages is huge relief after that. Scala has reputation of "rubified java" rather than "FP for java" because of hugely improved expressiveness of types (presence of data types). |
|