scala

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

scala

Jeremiah Jahn-4
dumb question here, as I haven't been paying attention for quite a while, but I noticed some Scala code in there now. I'm curious as to why you all made the decision to use it, and what benefits you get from it? What's a good example of something that got way easier with Scala than straight java, that would make you never look back?

thanks,
-jj-

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: scala

Erik Bruchez
Administrator
Jeremiah,

It's definitely not a dumb question.

If you are going to move from Java to another language that runs on
the JVM, Scala is a pretty obvious choice as it is was designed to be
quite interoperable with Java. There are other options like JRuby,
Clojure, and more, but they are bigger departures from Java (e.g. Ruby
is a dynamic language while Clojure is a Lisp dialect).

Now why would you use a language other than Java?

One reason is that Java-the-language has evolved very little over the
last 15 years or so (the biggest changes were inner classes and
genericity) and shows very little promise in terms of major evolutions
in the future. It is missing many features that you can take for
granted in many other languages today, including closures, functional
aspects, and much more.

As a programmer, you want to use the best tools at your disposal, and
Java-the-language no longer feels like such a tool. Like James
Strachan said [1]: "Java starts looking like COBOL to me".

Also, it just feels good and stimulating to move to something new!

So not long ago we decided to experiment and use Scala to implement a
new feature, namely the XForms engine's XPath dependency system. So
far the experience has been positive, and we plan to use more and more
Scala in Orbeon Forms.

It's hard to point to a single killer feature as there is so much good
stuff in Scala. I can name conciseness, pattern matching [2], traits,
and support for functional programming among many other great things.

-Erik

[1] http://goo.gl/pAaI
[2] http://programming-scala.labs.oreilly.com/ch03.html#PatternMatching

On Thu, Dec 2, 2010 at 8:44 PM, Jeremiah Jahn <[hidden email]> wrote:

> dumb question here, as I haven't been paying attention for quite a while, but I noticed some Scala code in there now. I'm curious as to why you all made the decision to use it, and what benefits you get from it? What's a good example of something that got way easier with Scala than straight java, that would make you never look back?
>
> thanks,
> -jj-
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws