Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's something primal about Java that invites people to write it in styles that ape other languages. In fact, whenever I write Java I find myself trying to write FORTRAN or Lisp or something else. I did a stint of work in Scala that now has me writing Scala in Java. I'm starting to feel that Java is a better Scala than Scala!

It all started when I had to write Java classes that consumed results from Scala. There are all these Scala classes like Some that, if you look at the docs, you realize you can use in Java without any trouble at all.

Many of the patterns that Scala uses can be implemented easily in Java... If there's something you like about Scala, you can usually do it in Java with a little thinking.

A good example is all of that Actor BS in Scala. You can screw around with that and come to realize that you're completely out of control, you don't know how many threads are involved and exactly how. Java's got ExecutorService, which for many of the tasks I do, can keep an 8-CPU machine busy with 100% utilization.

I remember having a discussion with a guy in Germany about his system that used Scala Actors that revealed that neither of us had any idea of what was really going on at all. Today I build pure Java systems using Java idioms that are so fast it's almost scary.



"You can screw around with that and come to realize that you're completely out of control, you don't know how many threads are involved and exactly how"

I think this was the turning point for me, the day I realized someone had created this large concurrent system with absolutely no idea or care as to what was going on. (the not uncoincidentally same day qa discovered some serious problems making the app become almost useless with extremely high CPU loads)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: