My ignorance is essential. I do not write what I know but what I need to know.
It is easy to become too fixated on optimizing something just because you can, even though it is not what you need to work on
[ LOTY ] Why Scala ?

In my previous post LOTY about my language learning selection for this year I made a very abstract description of Scala which was the language I picked. In this post my intention is to get a little bit deeper on the why of my selection.

After I started to read the Programming in Scala book which is as far as I know the best known reference for the language i learned some good stuffs which made myself realize that i picked up the right language to learn.

Here are some of the features I found interesting:

  • Growing new types: All data types in Scala are part of the standard library but they look like native language features. The advantage of this is that you can extend the data types in every way you want.
  • Growing new control constructs: You can change the behaviour of everything in an Scala program: operators, control structures etc. Because everything is on a lib and again feels like native language features.
  • Object Oriented: This language is a full fledged object oriented language a la Smalltalk or Ruby, so no primitive data type around or static members without a holder, that’s a good thing as soon as figure out how to make good designs :-)
  • Functional: Just fun to learn for the heck of it.
  • Compatible: Scala can interoperate with all existing Java libs. I’m hoping to use Scala at work soon just because it’s compile to bytecode :-)
  • Concise: Verbose stuffs in Java is just gone, you can describe an entire class in Scala just with one line of code and it’s stills very readable.
  • High Level: Most of the time when I’m creating some Java code I end up with a lot of abstraction which are not part of the same abstraction level as the code in question, that won’t be a problem in Scala because it provides the programmer with a lot of abstraction which make same in the context you are working on, the sytanx is a little bit weird at first but I guess with time it wil go easier.
  • Statically typed: I had a discussion a while ago with a friend regarding, the benefits of dynamic typing, at first I was neglecting the advantages of static typed as he suggest, but after reading about the Scala way I’m believing maybe it can very helpful. For example you won’t have to write a lot of testing for obvius things, documentation of the code through marking function parameters and return types, safe refactorings.

I will be back soon for more findings in Scala, which now is looking even moreĀ  interesting.