Tuesday, June 17, 2008

Upon reading on a few forums in Artima, I detected a desire for both a fuller Java and a simpler Scala. A fuller Java to have things like type inference and more functional style constructs. A simpler Scala to be have an easier specification, both for the mind and for the IDE.

What do you think would be more appropriate to help Java developers get a better language?

Continue to selectively better the Java Language

Define a subset of Scala, a Scala Light if you will. Or would a subset of Scala defeat the purpose of its synergy of features?

10 comments:

Anonymous
said...

Oh man, you are sure to get some hating from the hardcore Scala crowd.Anyway, I too am daunted by the complexity, implicitness, and seemingly multiple ways to do the same thing in Scala. A phrase like "Scala Light" seems alluring although I don't know enough about the language to know if that's possible. Pattern matching has me particularly worried, as it brings back the switch/case statements we all should hate. Certainly pattern matching is extremely powerful, and seemingly very usable, but it carries the danger of people using it for instance-of checks, for which double dispatch should be used instead, to ensure full consistent coverage of living code.Anyway, interesting and dangerous suggestion.

Also, just for the records, I am perfectly happy with Scala the way it is. I am not suggesting changing Scala itself in anyway, but rather "sprouting" a variant that could be appealing for different usages maybe.

I am happy using Scala at home, and I am (mostly) happy using Java at work, although I do miss closures. On that front, I still have to take a look at the jedi library and closures could be in Java in a few iterations more.

Scala isn't as difficult as you might think. I found that I could easily get started writing Scala code and gradually use more and more features, though to date I haven't pushed traits or self types very far, probably because I don't like OOP. I've probably used most of the other features now though, except the actors and parser combinator libraries.

I possibly had an advantage over some, through knowing Java and half of Haskell.

Dmitry Jemerov and Martin Odersky both agree that Scala is complex, although Martin Odersky makes the point (from vast experience), that it is easy to learn:"Regarding Scala complexity: It's true that Scala is quite a difficult language to implement, and I have a lot of respect for JetBrains' determination to write a complete compiler for it. But in my experience it's generally not a very difficult language to learn. I speak from experience: I have been teaching many hundreds of undergrads in it, and received overwhelmingly positive feedback."

It is this complexity, both for the IDE makers and for the language users, that I sense is repelling some away from Scala.

Maybe as some programming ideas are becoming mainstrean like functional programming, more people will get interested in Scala.

I have yet to dive deep enough or wide enough in Scala to get an overall picture.

Meanwhile, I still wonder if a lighter (yes less complex would also mean less porwerful, I know) alternative would be better suited to succeed Java, particularly in the enterprise world.