Scala Principles in a Nutshell (Part I)

I could write a little paragraph about how much I like Scala and maybe use my poor evangelist skills to convince you to use it instead of your language preference.

But no, I think that you are doing great with your preferences, whatever they are.

And also, I’m going straight to the point because that’s my style.

What’s Scala?

Scala is a programming language which implements the majority of the Functional Programming concepts, in addition to being also an Object Oriented Programming Language.

Like Java, the Scala compiler generates a bytecode that can be executed in a JVM. Also, Scala code can work with Java code perfectly.

On the other hand, I think that maybe it has a kind of bad reputation because of the different paradigm that manages, and it may be a little difficult to change our perspectives if we are used to imperatives languages (and that’s okey). Anyway, lambda expressions are more and more used in other languages, so we’ll see 😀

Which tool is used to build Scala?

Mainly SBT. It also works with Java projects. It has an interactive shell, allows continuous compilation, testing and deployment.

In what sense Scala is a FP language?

Every computation is treated like a mathematical function, this way we don’t need to:

  • Store variable states or mutable data.
  • Do assignations
  • Create loops and other structures of imperative programming.

This way we can use less memory (and less code) in our applications.

Ok, cool. Let’s see the fun stuff, shall we?

In the next post folks!

goto Part II