Why go for Scala ?

Ok. I want to put 3 important points before you, that can convince you to go for Scala


1) Functional paradigm of Scala

2) Parallelism and Concurrency of Scala (Distributed computing support).

3) Interoperability with JVM



Functional programming

Claim: The only way one can develop bug free software with
minimum efforts and be confident about the correctness of the software is by using functional programming.

Why is functional programming important for software development ?

1) FP gives code reusability
2) FP gives code modularity
3) FP gives compose-ability
4) FP gives side effect free code (bug free code)
5) FP software any be easily testable.

FP encourages immutability.

The above features of FP makes the programs modular, extensible, testable, reusable and composable.
These principles are the mantra of Great software development.
So, that means software development with FP language can have these benefits for free.

We can also code in Java and be functional but the fact is Scala supports functional paradigm more than what java does.
Using Java for functional programming is like using C for object oriented programming.
Scala offers all functional features and hence is easy to be functional.
Scala is also concise and encourages immutability.
Scala comes with other features like implicits, value classes, every operator invocation is a method invocation in Scala.
Scala is extensible language. (we can develop dsl’s in Scala).

Why should we be worried about the concurrency and parallelism (distributed software) and why should we be choosing language like Scala for parallelism, concurrency and distribution ?

Number of cores are increasing in the computers and companies stopped building processor with higher clock speeds.
Instead in order to do computationally intensive work, The way to proceed is to use large number of machines.

For example if we want to handle millions of client requests .
we cannot buy a big server with tera flop processor because of cost, availability and efficiency reasons.
So, the only way out is to use many machines of decent computation power.

With internet of things this becomes more important and only way out is to go for distributed architectures.

Now, What does Scala do for us in developing distributed software ?

Scala ecosystem comes with first class support for building concurrent and distributed software.

For concurrency we can use “Future” monad and for distribution needs we can go for “Actor” abstraction.
Future helps in scaling up and Actor helps in Scaling out.

Scala ecosystem (Akka, Play and other projects) is said to be reactive.
Reactive emphasises software to be responsive, fault tolerant , elastic and message driven.
Scala ecosystem offers tools to deal with lots of issues in developing and maintaining concurrent and distributed software.

“We can say Scala offers first class support for Distributed software development”.

Since I started coding in Scala. The way I build software has changed a lot.
Now I think about scalability, resource usage and fault tolerance to make my
software better and intelligent for meeting customer needs.

Scala supports message driven semantics for software developing.

Most of it can be done in Java as well but with lots of pain and verbosity.
Now and then Java mutable nature enters the code and spoils it.

Interoperability with JAVA
Interoperability with JAVA is the boon to the Scala language. Scala language adoption is largely for this reason. Its highly risky for the companies to bet on the new language if their existing code base written in widely used language java goes waste. Also there are lots of libraries out their which are written in Java. Interoperability with java means every Java library out there is a Scala library by default. Also, JVM is widely used for project deployments why various companies in the world. JVM is also known for its scalability and security features. Hence, interoperability with JVM and Java is a real boon for Scala. Its wide adoption is also because of this fact.

Note: They are many other important features that Scala offers and Java cannot offer as of now.
I think its impossible for Java to offer those features until Java 27 (27th java version) just kidding ;).

“Scala >>>>>>>>>>>>>>>>> Java”

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.