Couple months ago I start learning Scala programming language and I want to share what I have learned so far.
I will try in several weeks maybe months share everything I know about Scala.
So let (scala) games begin.
Scala is a programming language created by professor Martin Odersky. It’s object-oriented and also a functional programming language. So you can write your code using OOP, FP or both. In Scala everything is an object, primitive types don’t exist and operators are methods. Also, interesting OOP stuff are trait interfaces, case and object classes. Functions are first-class citizens in FP, so you can assign them to variables and pass to other functions like other objects. Other interesting FP concepts in Scala are immutable variables, immutable data structures, and pattern matching.
Scala is statically typed language but it feels like it’s dynamically typed. I call Scala like a modern version of Java with some mix of Ruby and Python. Scala minimizes unnecessary syntax (such as declarations of variable type) and with the flexible syntax, you have feeling that you write code in the dynamically typed language.
It’s a JVM language, but there is a .NET version of Scala, also exists Scala.js and Scala-native is in a developing mode.
Who uses Scala? Twitter, LinkedIn, Netflix, Tumbler, Foursquare …
And for the end, I want to share few interesting quotes.
Why Twitter choose Scala:
„ … The other big reason we looked at Scala was that, although we’ve run into problems with Ruby, we like the flexibility of the language. We like that it’s such a full featured language , that it’s fun to code in. It’s the same reason so many Java people end up writing Ruby after they leave some big enterprise company. They want to have fun day to day. We didn’t want to leave that behind and go to a language with a very dry, businesslike community, like C++, for example. We know that people write super high-performance code in C++, and engineers like Steve and Robey have had experience with that. But we wanted to be using a language that we’re really passionate about, and it seemed worth taking a gamble on Scala.“ — Alex Payne
What creators of Java, Groovy, and jRuby thinks about Scala:
“If I were to pick a language to use today other than Java, it would be Scala.” — James Gosling, creator of Java
“Scala, it must be stated, is the current heir apparent to the Java throne. No other language on the JVM seems as capable of being a “replacement for Java” as Scala, and the momentum behind Scala is now unquestionable. While Scala is not a dynamic language, it has many of the characteristics of popular dynamic languages, through it’s rich and flexible type system, it’s sparse and clean syntax, and its marriage of functional and object paradigms.” — Charles Nutter, creator of JRuby
“I can honestly say if someone had shown me the Programming in Scala book by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I’d probably have never created Groovy.” — James Strachan, creator of Groovy.
Top comments (1)
Thanks for sharing, it’s nice you found Scala, it’s a great language !!