Link Details

Link 700559 thumbnail
User 956993 avatar

By singularity
Published: Nov 24 2011 / 11:32

Some thoughts about complexity of Scala in comparison to the Java complexity that we face every day but fail to notice.
  • 12
  • 1
  • 1593
  • 1030
User 902267 avatar

javakata replied ago:

-2 votes Vote down Vote up Reply

"Java forces you to actually know how exactly variance works."

No it doesn't, it's optional. You can also get invariance or complete co/countervariance. But since you don't know how that works, you can't see why having complete co/counter variance for read and write operations is bad.

By the way, not only is Scala abismaly slow as compared to Java. It's abismaly slower than Java reflection/introspection libraries like SPeL. And those libraries are by themselves abismaly slower than pure Java.

User 213745 avatar

kitdavies replied ago:

1 votes Vote down Vote up Reply

"By the way, not only is Scala abismaly slow as compared to Java."

I'm sure Twitter wouldn't use it for their API backend if it was abysmally slow.

Truth is, it depends very much on what you are trying to do with Scala. It can be just as fast as Java but certain styles or patterns of coding will slow things down. See here for example:

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java