While I don't think _this_ article presents any compelling reasons to learn scala, you still should. If I had to list my reasons they would be
0. Of all the "new" languages Scala has the best selection of libraries and I think is the easiest to become instantly productive in. Languages like Rust and even to some extent Go are also really exciting and let you do great things, but the native library support isn't as robust as it is for Scala, and Rust in particular is still under heavy development and isn't really ready yet. From a stability standpoint you should be OK with Go, but even it will be baking in more stuff and changing more then you will see Scala change.
1. The Productivity Boost Effect. You will find you can solve complex problems with a few lines of code and a little thinking. I have ported 1K+ lines of C++ to 10 or 20 lines of Scala
2. Personal Growth. If you are coming from C++ or Java and have done Imperative programming your whole career then Scala is a _gentle_ introduction to functional programming. As you start to use the language you might start by using it as java and only typing half the character ( no type signatures ,semi-colons , or in some places parentheses ) as you do more things and look for elegant solutions the function patterns will become obvious in their usefulness and you will start seeing their value first hand.
3. Awesome Libraries you get access to. I think immediatly of things like Akka, Twitter Storm , Play2 , and my personal favorite Spark[1]. Not that there aren't great libraries in other languages and most if not all of those expose themselves to Java and other languages, but its great using the native language they were designed for. you can do some great stuff.
4. Finally its better then spending all day reading and commenting on Hacker News. :-)
> I have ported 1K+ lines of C++ to 10 or 20
> lines of Scala
I'm not doubting your claim, but as a general rule that sounds awfully steep. Maybe you got lucky (because whatever you wanted to do was a brilliant match for some standard library function or happened to be tailored to a uniquely "Scala-y" feature). In most cases of drastic code reductions upon language switch, however, it's one of two phenomena:
a) Rewrites are usually more succinct simply because you've done the legwork before; a second solution is almost bound to be more to the point.
b) One wasn't using the initial language properly.
Sure, going from C to Haskell may lead to insanely compressed code, but C++ in conjunction with its mature standard library, Boost, and the multitude of libraries available is such an advanced and excessively paradigm-spanning language that a reduction by not one but two orders of magnitude suggests a less than perfect first draft.
It was a combination of reasons. Firstly I wrote it better the second time. I think almost any time you rewrite something even in the same language you can do it in less lines. Secondly even with boost and the STL its really hard to do some things in c++ in a few lines of code. My case was incorporating ASIO the framework to get it up and running and get its event loop working as well as the cod to parse the data that was being received. In Scala with Akka it was an actor with the IOManager and then simple text manipulation and I had replicated the functionality.
0. Of all the "new" languages Scala has the best selection of libraries and I think is the easiest to become instantly productive in. Languages like Rust and even to some extent Go are also really exciting and let you do great things, but the native library support isn't as robust as it is for Scala, and Rust in particular is still under heavy development and isn't really ready yet. From a stability standpoint you should be OK with Go, but even it will be baking in more stuff and changing more then you will see Scala change.
1. The Productivity Boost Effect. You will find you can solve complex problems with a few lines of code and a little thinking. I have ported 1K+ lines of C++ to 10 or 20 lines of Scala
2. Personal Growth. If you are coming from C++ or Java and have done Imperative programming your whole career then Scala is a _gentle_ introduction to functional programming. As you start to use the language you might start by using it as java and only typing half the character ( no type signatures ,semi-colons , or in some places parentheses ) as you do more things and look for elegant solutions the function patterns will become obvious in their usefulness and you will start seeing their value first hand.
3. Awesome Libraries you get access to. I think immediatly of things like Akka, Twitter Storm , Play2 , and my personal favorite Spark[1]. Not that there aren't great libraries in other languages and most if not all of those expose themselves to Java and other languages, but its great using the native language they were designed for. you can do some great stuff.
4. Finally its better then spending all day reading and commenting on Hacker News. :-)