Profile photo for Daryoush Mehr

I would recommend against using Scala. There is a fad these days that Scala is right thing to do. I think it is a fad because:

A) IMHO, Scala syntax is ugly. Take for example this method in Haskell:
[code=haskell]
(>>=) :: m a -> (a -> m b) -> m b
[/code]
vs the scala equivalent

[code]
abstract type
M[+A] <: Monad[A]
abstract def
flatMap[B](f: (A) ⇒ M[B]): M[B]
[/code]
The ugly syntax make understanding concept very difficult.

B) The idea that Scala and Java work together is like "OO is good for object reuse". Reality is that if you are doing Scala you end up redoing everything. It make sense to do so, because if you are working in a different paradigm it makes sense to recreate your world in this new paradigm. Sure, you can use Java but there is ample evidence that folks programming in Scala have created their own versions of things. Take for example, simple build tool (sbt). Obviously Maven was not good enough for them. Same goes for every other module you use in Java. In many presentations from companies that use Scala you hear about libraries that they have redone to make things better for themselves.

C) The difference between Functional programming and OO is not just syntax. Understanding FP for an OO programmer is not like learning Python for a Java programmer. You have to be ready for a paradigm shift and the serious effort that goes into learning it (think a minimum of a year). I really hate to work with a team that has partial understanding of FP and OO and wants to write code that is neither one nor the other.

D) Current Java with Functional libraries (eg. Guava) brings a lot of elegance and are well supported and integrated with Java, albeit, a bit verbose, but nowhere as ugly as Scala syntax. To take the plunge to FP beyond the Java libraries, you are looking at implementing embedded domain specific language for your problem domain. If you are doing so as a Service (e.g. WebService) the choice of language is not exposed to the outside system. Then, If you feel a language is elegant and supported, specially in these days where you have virtual machines (as in EC2 of Amazon Web Services), you should be using it and forgo the current fads or partial FP/OO solutions.

Side note: I have not studied Clojure. It may be a good option. For me type checking and compilation is important, so I avoid languages like Clojure. But it may work for you.

That's my 2 cents!

View 11 other answers to this question
About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025