Hacker News new | ask | show | jobs
by jaxytee 4361 days ago
>The mind-share split between Clojure and Scala scares me.

I think Scala is going to win the corporate mind-share. I just accepted an offer at a large corporation that is writing all of its new back end services in Scala.

The lead architect is familiar with Scala and Clojure, and is trying to introduce the latter into the codebase (he successfully introduced Scala). There is a use case for an "Immutable Database" for one of the services, and It would make sense to use Datomic/Clojure for it.

The hesitation to use Clojure seems to come from some developers, and not the management team. I think it stems from the prospects of having to maintain a large codebase that is without first class static analysis.

Note: I think Scala and Clojure both rock.

1 comments

"I think Scala is going to win the corporate mind-share. - very unlikely. Java 8 will (continue to) win corporate mindshare. Scala added the missing elements to java, but Java 8 adds them into the base line so the need for scala goes away. Corporations have too much invested in java and there's not enough differentiation between scala and java 8 to make the cost of that transition likely. I predict that we'll see a steady decline in Scala as Java 8 gains traction in the enterprise development world.
I was referring to the Clojure vs Scala as a Java replacement competition, by if you think Java 8 is a Clojure/Scala Killer your mistaken.

First things first, Java 8's Lambda implementation is shoddy at best compared to first class function support in Scala/Clojure. The entire idea of having to explicitly convert a collection to a stream to access map/filter functions is non optimal. You don't just add lambdas to a language and automatically expect them to lift it's collections libraries to the level of Scala's and Clojure. The collection's lambda operations are the real benefit of using a language with first class function support.

The other inconvenient truth is that you still will be writing Java code, in all of it boilerplate glory. Still no Scala like type inference, no Clojure esque homoiconicity, no ability to reduce everything to a value like in Clojure/Scala, just plain old "it'll work" Java.

Java 8 did not add all the missing elements. It did not add even the most of them nor the most important. Sure, it added some, but I doubt it is 5% of what Scala has to offer, and I doubt they are the things that people primary choose Scala for. Also, even if we compare the features that Java 8 added, e.g. lambdas - they are nowhere near as nice to use as in Scala, and they don't play so nice with the rest of the language as it is in Scala. IMHO Java 8 will only help Scala in becoming more popular, by improving Scala's performance and Java interop.
If you had a look at what the Scala ecosystem is both shipping and working on, the gap between Java and Scala is increasingly widening, not closing.
Right, and there are some really big things in Scala which already got quite a lot attention from enterprises: Play Framework, Apache Spark, Akka. Funny, I know some people using those things from... Java even though it is very cumbersome to do so.
Yes, isn't that great? They lower the cost of switching, by not forcing people to migrate both language _and_ framework at the same time.

Though I had stuff like parboiled2, Slick, scala.meta, dotty, shapeless in mind (which don't support Java at all), these are good examples, too.