[I have 2 answers: How I got hooked. And what I'm seeing as others
already here and new hires start learning Scala]
Speaking for myself: About 7-8ish months ago, Wade sent me the link
to akka
http://akkasource.org/. I'd never seen or heard of Scala
before. He then sent me a link to the ChatServer Tutorial.
http://doc.akkasource.org/tutorial-chat-server-scala
And that's what hooked me... initially it really didn't have much to
do with the akka lib, it was the expressiveness of Scala in that
tutorial as I kept thinking about how I would do it in java/c#.
I read this
==================================================
trait ChatServer extends Actor {
self.faultHandler = Some(OneForOneStrategy(5, 5000))
self.trapExit = List(classOf[Exception])
val storage: ActorRef
log.info("Chat server is starting up...")
// actor message handler
def receive = sessionManagement orElse chatManagement
// abstract methods to be defined somewhere else
protected def chatManagement: Receive
protected def sessionManagement: Receive
protected def shutdownSessions: Unit
==================================================
Kept reading and saw the implementation for
chatManagement/sessionManagement/shutdownSessions provided
via other traits. And then at the end I saw this...
==================================================
class ChatService extends
ChatServer with
SessionManagement with
ChatManagement with
RedisChatStorageFactory
==================================================
Wow... What I was seeing was the use of partial function chaining
(orElse) with Abstract members where the implementation of those
partial functions was wired up in the ChatService via Mixin
Composition. I was seeing that mix of OO/FP. Partial functions,
pattern matching and a better model than C#/Java inheritance via
Traits. If you've ever tried to build a large system with a massive
Domain Model and struggled/fought with traditional inheritance and OO
then you see Scala and you freak, at least thats what happened for me.
The second thing that got me was akka itself. Its crazy awesome if
you need Concurrency, Scalability, and Fault Tolerance(doesn't
everyone?).
[Now for my second answer]
Here is a link to the internal doc I had ready when the interns showed
up.
https://docs.google.com/a/t8webware.com/document/pub?id=1NaW73omYMg_bgk0Ofm7Wrfopacu9LOM3scAmkT2aXEg
We also gave them Programming Scala and the OReilly book.
One of the things we try and do is meet weekly and share what we learn
or know. There is so much to know and learn when building a large
system in Scala that you just have to take the time to do that.
So how did that work? I think it worked well however... A lack of
understanding regarding Functional Programming will seriously hamper
your ability to leverage the full strength of Scala. So this leads to
a rant...(you can disconnect here if you like :)
I agree with what a lot of people say about Scala regarding the fact
that its easy to get started with it. I've heard many say things like
" ... you just write Java/C# style code in Scala". Thats true, but
thats like saying that its easy to climb into the cockpit of a stealth
fighter plane. Who cares. I want to fly the damn thing! And it
takes a bit to learn how to fly with Scala and then another while to
learn how to fly well and correctly. From my perspective, the biggest
hurdle for our team (including myself) was understanding FP.
My way of tackling my own lack of understanding regarding FP was to
start learning Haskell and Erlang. Maybe not the best recommendation
for everyone but it worked really well for me as I was able to wire in
conceptually what was going on with things like .map/flatMap, Option,
Types, TypeClasses, Higher Order Functions, Combinator Libraries
etc... When you're completely limited to a functional view of the
world, it forces your brain to rewire its synapses :)
Which brings me to another point worth making. Scala is not just
another language, its a different WAY OF THINKING ABOUT WRITING
SOFTWARE. <<quote shamelessly stolen from David Pollock and
regurgitated>> And I'm saying that, from the context of C#/Java. If
you are fortunate enough to have slammed(slammed meaning built
something that other people use) Haskell, Scheme and Erlang along with
Java and some Ruby (OR if your name is Eugene Wallingford) then
getting Scala is a gonna probably be fairly straightforward :)
Which brings me to my final rant... I don't think Scala is
complex(like you can read all over the interwebs). I think Scala has
taken some of the the best known ways of thinking about writing
software and combined them to a single programming model/language on
the JVM/CLR. I'm afraid to say this but it all goes back to LISP
folks. This stuff isn't actually new. My problem was I didn't know
that :)
The way I'm going to pitch the next potential hire is... "Scala is
going to kick your ass, however you'll be a better programmer for it".
sorry for the rant