

Scala as long-term replacement for Java - fogus
http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html

======
geebee
I'm really pleased to read this blog post. I went to JavaOne this year (free
ticket, I wouldn't have paid or asked my employer to pay), and it was kind of
depressing. I hadn't been there since the early 2000s, and there just wasn't
much spirit in the room. I'm sure the down economy and Oracle takeover had
people down a bit, but I also think "Java programmers" (meaning folks who do a
lot of work in Java) no longer feel excited about the future. It's starting to
feel like you're at a conference for legacy systems.

I got out of my funk by attending absolutely ever session on Scala I could
find, and it really did lift my spirits (I swear I didn't intend the pun).
I've been learning Ruby (and I'll stay on that path for a while), but the
Scala talks gave me what I ultimately go to conferences for - the opportunity
to get excited about the future again.

------
davidw
Despite having invested a bit of time and brainpower in Erlang, I have a
suspicion that Scala is more likely to be a better bet over the long haul.
It's fast, piggybacks on all the software out there for Java, and seems to be
reasonable to use.

I do have some questions about its concurrency abilities though (not
rhetorical ones, real ones): I _know_ that Erlang deals really well with
concurrency, because of its internal scheduler. It's fairly difficult to
completely wedge Erlang, in other words. How does Scala work out from that
point of view?

~~~
fogus
There are a couple of nice articles about Scala vs. Erlang, although they take
a more nults-and-bolts view:

<http://www.infoq.com/news/2008/06/scala-vs-erlang>
<http://yarivsblog.com/articles/2008/05/18/erlang-vs-scala/>

-m

~~~
davidw
Yeah, Yariv points at what I suspected, that the Erlang model is a bit more
robust. However, I wonder if Scala is, in practice, 'good enough'.

~~~
nbhat
Twitter backend processing was rewritten in Scala.. Though I dont have
specific opinion yet about Scala, that is a point to be noted.

~~~
pygy
While we're at it: the backend of the Facebook chat is coded in Erlang. 1-1.

No peculiar opinion about any of them either, btw.

------
omouse
_I've written tons of Java over the last decade or so & think its been a great
evolutionary step from C++ and Smalltalk _

Did anyone else go wtf?

~~~
brianm
No, wondered why he was restating the obvious. There are certainly features of
both C++ and Smalltalk which would be nice to have in it, but Java is, on the
whole, an advancement over them.

In particular, GC and a great standard library for C++, and file-based and
more performant (yes, yes, hotspot is based on a smalltalk derived vm, blah
blah, the numbers still grossly favor java) and a more conventional
interaction with the host system over smalltalk. The last is bizarre as java
still absurdly sandboxes away the CRT. Oh well. Less of an advancement on
Smalltalk, more of a more palatable branch of evolution, maybe.

~~~
michaelneale
I think it was Paul Graham who said Java was an evolutionary dead end (which
doesn't mean dead so much as that branch of the tree won't continue).

It seems now at least the JVM, or the best bits of it will spawn other
branches.

As for the java language (which is probably what pg was referring to?) - I
agree it is probably a dead end. Except in some shallow basic syntactic sense
- javascript and so on (the continuation of the "curly braces") - not sure if
that means anything though. In any cases, certainly the lessons learned will
continue (what worked well, what didn't) into a whole lot of other languages
and has been.

------
lallysingh
Is it just me hoping against hope, or does it look like the world really could
start shifting into a more functional paradigm?

Or at least the parts of the world that doesn't bill by the hour/LOC..

~~~
axod
It's just the way cycles work. Few years of over exaggerated OOP hype, then
few years of over exaggerated functional hype.

Some people just like taking things to extremes and seeing things in
completely polarized viewpoints - good vs evil - rather than recognizing that
both are great in different circumstances.

It's a lot less tiring (and more productive) to use whatever tool fits the job
best, rather than whatever tool is currently in fashion IMHO.

~~~
huherto
...and my impression is that FP and OOP are complementary rather than mutually
exclusive. But I only have basic understanding of FP.

~~~
eru
Yes. Alas, most of the automagic type inferences we are used to in FP
languages (Hindley-Milner) does not play too nice with OOP's class members.

~~~
stcredzero
What if class members had to be typed?

~~~
jongraehl
They are (in Scala).

I think it's overloading (punning on static type of the same function,
operator, or method name) that makes explicit type declarations more often
necessary in Scala than in Haskell or ML.

------
icey
I asked this at reddit as well, but I think HN may have some better insights.

What does this say for Groovy (the language) that one of its co-creators is
out advocating Scala?

~~~
rmaccloy
Well, Groovy has never been "sexy" (in a CS sense) in the way Scala or Clojure
are perceived to be.

Despite that (or perhaps because of it) my experience has indicated it's in
wider use than either, and it has some enterprise-y backing (SpringSource) so
I expect it's not going away.

Both Scala and Clojure are attracting people who weren't originally on the JVM
though, which (again anecdotally) I don't think you can say of Groovy.

~~~
mblakele
Confirming your second point, Indeed's job trends suggest that groovy has more
jobs, and that it's growing faster:
[http://www.indeed.com/jobtrends?q=groovy%2Cscala%2Cclojure&#...</a><p>Caveat:
some of these jobs might be talking about how groovy they are. On the first
two pages of <a href="http://www.indeed.com/q-groovy-jobs.html"
rel="nofollow">http://www.indeed.com/q-groovy-jobs.html</a> there were 19
groovy-lang jobs and one false positive.

------
johnm
Scala is to Java as C++ is to C.

~~~
fogus
Debateable -- but in any case one strike against your theory is that C can be
made to compile using a C++ compiler, but no amount of contortions will make
your Java do the same for Scalac. C++ has a lot of baggage in the form of
_source-level_ compatibility with C while Scala does not. It is _API_
compatible, but that is one of its great strengths.

-m

