Recently, I got a change to do a project with Scala. In short, Scala is an object-oriented functional language. The official website also says that
Object-Oriented Meets Functional
and while learning it, I could find the meaning. Grammatically, it provides several tools to deal with object-oriented language concepts like inheritance or polymorphism. Scala is also a functional language as function is first-class object in the language and it has some key concepts used in other popular functional languages.
Scala the enjoyable parts
First of all, I’d like to say that it’s really enjoyable to write code in Scala.
In Scala, I can escape from these things. I can’t say it’s perfect, but until now I found it was fine. Especially, concerning concurrency, I’m happy to use Futures and Promises. I think it’s a quite elegant way to deal with concurrency. Also I really like the pattern matching and list manipulating in it. Surely they’re quite common features also in other functional languages, but they sometimes don’t seem very familiar(LISP and Haskell fans won’t agree with this, though). I think that Scala has a good grammar about the functional features, maybe because ‘functional’ is not compulsory in Scala. We’re totally free to choose between the functional way and a conventional way.
With Scala, I can easily think that language features are helping me. It seems rightful that programming languages help developers, but sometimes they really don’t(I’d not like to suggest an examphple).
I also found something not very perfect for me.
Also I’d like to say about resources. I think Scala itself and its modules have good documentations, usually provided with Scaladoc. However when I want to find a method of String object, I should find a Java document, not a Scala one, because Scala uses
java.lang.String for its String type. For sure, pure Scala types like
List are in the Scala document. I felt it’s quite annoying to find one language’s reference in two sources.
Finally, concerning its language environment, I think it should be a bit neater. For example, when I want to handle JSON or DateTime, there are plenty of modules about them including Java modules, pure Scala modules and just Scala wrappers of Java modules, but it’s difficult to choose one. Some of them even don’t have a good webpage to introduce themselves. I don’t mean that every module needs a neat website, but at least it can help developers to find some reliable information.
I’m really enjoying writing code in Scala and the shortcomings would be settled down when I get accustomed to it. I think Scala is quite new and in addition to the current environment, a lot of good things will be made in the future. I hope I can find more enjoyable parts in the language from now.