Day 4: Scala

Scala is one of the most discussed languages in the past years. It covers the most urgent problems of programming and uses the java virtual machine as runtime environment so you can use all of your java code. Scala is functional and compatible to java bytecode.

Scala can become the next big thing, because Java is not working well in modern environments. Scala covers the problem of concurrency by using a functional paradigm. It is incredible easy to write applications with multiple threads without any headaches. If you want to write high scalable applications in a Java environment Scala is a good choice.

There are some drawbacks compared to a “real” functional language. Scala is like C++ – a programming language caught into two different worlds. As long Scala is creating new concepts in the JVM it’s simply great, but using the old Java stuff is so wrong… Let me give you an example – mutable variables. Let us asume that you have the following code:

val harry = new Person("Harry", "Webber")
harry.buyFromAmazon()
harry.playSmartphone()
harry.doWork()

As long as harry is immutable you can do the three methods in any order or at the same time! That is beautiful and functional programming languages are working like that. But because Scala want’s catch more Java developer it is also possible to have mutable variables. This breaks the whole concept :-/

Anyway Scala can become the next big language on the market like C++ became – also a language that was caught into two different worlds…

Leave a Reply

Your email address will not be published.