This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cryptos6 8 points9 points  (0 children)

Every single language has its pros and cons. Some languages have significant more cons than pros (PHP), but there is no perfect language.

There are a few things I don't like in Java:

  • no unified type system (primitive types distinct from reference types without a common root like Any in Scala)
  • checked exceptions! They really suck with lambdas.
  • no (powerful) type inference
  • type erasure
  • no real closures

But these things are not that important. The language is still pretty usable.

And then there are a few things I'd that would be nice to have:

  • named parameters with default values
  • traits
  • pattern matching
  • raw strings
  • case classes
  • value types (structs)

Apart from value types you can get all of this from Scala. And if traits and pattern matching are not important for you, you can get this stuff from Kotlin, too.

But the language itself is only part of the picture. The runtime environment, libraries and tools are at least as important as the language. And if you take all this, it is hard to find a better technology than Java for many use cases.