2007年5月15日星期二

David Pollak on Scala

One of the alternative languages that runs on the Java Virtual Machine is Scala. In 5 things a Java developer needs to know about Scala, David Pollak, a hard core Java developers, writes about his experience integrating Scala with Java.

Scala has much of Java's goodness, much of Ruby's goodness, and works with the existing Java infrastructure (Ant, Eclipse plugin, Tomcat, Java class libraries, etc.)
The list in no particular order is;
Interoperability with Java
Scala is more compact and expressive
It’s not a deep dive like Haskell or OCaml
XML is an integral part of Scala
Scala traits (similar to mixins)
Scala traits are similar to Java interfaces the difference being that traits maybe partially implemented. Though traits really look more like abstract classes, it allows one to inherit different methods from different traits. If you don’t quite understand the last point, that’s ok as you can opt for Java while ignoring the difficult parts of Scala.
David leaves off with a challenge.

So, if you're looking for an alternative to Java because you've reached the limit of what you can do with Java, give Scala a try.

Leaning another language always makes you stronger so the question is; why wait until you’ve reached that limit. After all, you can stretch Java quite far.

没有评论: