Scala vs Python

List some of the advantages of using Scala, as opposed to other languages.

In order to explain this, I am comparing Scala vs Python.

If you want to write some serious Apache Spark programming it is better to choose Scala because of following reasons.

Note: Following comparisons are based on the fact that I am going to write Apache Spark for some of the big data analytics operations:

  1. Scala is 10 times faster than python because of running on JVM.
  2. Scala is Static Typed language where as Python is Dynamic typed language
  3. Asynchronous versus parallel versus concurrent programming:

Asynchronous programming: It involves some calculations time-intensive tasks, which on the one hand are engaging a thread in the background but do not affect the normal flow of the program.

Parallel programming:  It incorporates several threads to perform a task faster and so does concurrent programming. But there’s a subtle difference between these two.

The program flow in parallel programming is deterministic whereas in concurrent programming it’s not.

For example, a scenario where you send multiple requests to perform and return responses regardless of response order is said to be concurrent programming. But where you break down your task into multiple sub-tasks to achieve parallelism can be defined as the core idea of parallel programming.

Scala works better when compared to Python when we are dealing with either of these 3

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: