| Article Index |
|---|
| Why Scala |
| Hire Smarter People |
The author has a more than decennial experience as Java developer, but also strong interests for the functional programming, mostly in Scala, and the development of Domain Specific Languages. By leveraging these two passions he also created the open source library Hammurabi, a rule engine written in Scala providing an internal DSL to write its rules.
Almost 3 years ago I discovered the Scala language and that was the first time after a dozen years of Java programming that I felt it worth to move on and start learning a new language. Since then I also started trying (with alternate luck) to convince my friends and colleagues of the beauty of Scala, showing them how elegantly it allows to mix 2 apparently antithetical paradigms like OOP and FP, resulting in very concise though readable code. I also tried to "take them while they're young" so I gave an introductory Scala course in a couple of universities in North Italy, where I live. But only now I am realizing that, if my purpose was to promote the spreading of this wonderful language, I was speaking to the wrong audience: the first people who I and the other Scala fan should convince are actually the ones who put the money in this enormous Luna Park that somebody still calls Information Technology. So this post is intended to be read mostly by entrepreneurs and this is my brief list of the reasons why adopting Scala as your main programming language makes a lot of sense especially under a business point of view:
Less code => less time => less money
In my experience as a Scala developer I found that in average a given piece of Scala code is about 3 times shorter than the equivalent Java one. Indeed it allows to cut down all the unnecessary verbosity typical of Java, so programmers can concentrate only on the development of the business-logic of their problems. If you see a line of code as the atomic building block of your (software) product this sentence should have the same impact as the possibility for a car manufacturer to adopt a new technology allowing him to build a given car with only 1,000 components instead of the usual 3,000 ones. In other words, by using Scala, your development team has to design, write, test, debug, refactor and maintain only one third of the code. Don't you already see a big ROI in it? In this sense I believe that moving from Java to Scala has a similar effect of moving from C/C++ to Java 15 years ago: it reduces, in some cases dramatically, the time you spend to develop and maintain your software and therefore also the money it costs you. And as your project gets bigger, the saving are just piling up more.
Faster time to market
This is a direct consequence of what I wrote above: reducing the time you spend in developing your product also gives you the possibility to ship it faster. You will hit the market earlier than your competitors and I don't think I should explain to an entrepreneur which advantages that could bring.
Make business analysts and developers speaking the same language
One of the biggest cause of failures in many IT projects are frequent misunderstandings between business analysts and developers. Some of the features of Scala have been explicitly added with the purpose of making the code very readable. That makes Scala particularly suitable for implementing DSL, namely Domain Specific Languages designed to express the business rules with the same jargon of the domain they are intended to model. By using this technique the developers can encode the business rules in a way that allows also the analysts to understand and validate them while reading them directly from the code, and so reducing the possibility of incomprehensions between who defines the requirements and who is asked to put them in code.
100% Java compatible
Scala programs are compiled with the same bytecode and run in the same Virtual Machine of your traditional Java ones. It means that Scala is fully interoperable with Java and that allows you to reuse your Java components and all the amazing Java libraries and framework you are used to employ in your day by day work without any effort. You will not need to rewrite any of your existing Java software and then you will not lost anything of your former investments, or you could decide to gradually migrate even all or part of them to Scala only if you find that this is opportune for the specific project you are working on.




