back

by mark_l_watson·16y ago·view on hn ↗
That was a good article. Generally I use Scala very little, but in the last few days I have written both Scala and Clojure wrappers for some of my Java code (I wanted idiomatic wrappers that feel Scala-like and Clojure-like - that is why I don't just directly call into Java).

Like Clojure, Scala could be a universal programming language for me if it was not for the learning curve: I have invested so many years on Lisp, Java, and Ruby that it is difficult to motivate myself to become proficient with 2 more languages.

Anyway, both the article and the comments to the article were interesting.

1 comments
The primary barrier to entry for me in almost all programing languages were not the language constructs, but the libraries.

Considering you can use any java class in Scala or Clojure, I find them fairly easy to migrate to (though clojure is much more challenging due to the syntax and more pure functional nature).

The primary barrier for me is that every time I look at Scala, I think that this must be what a Perl and Java love child would look like. Granted, syntax isn't a (sole) reason to discount a language, but gawd some of the code examples look really obscure. I can't imagine trying to read it on a day to day basis, no matter how powerful.
I think Scala is more of a Java and Haskell/ML love child than anything else. Having used both of those, I found most of Scala pretty easy to pick up.

The main thing I found is that there are a lot more syntactic constructions you have to be familiar with than in most other languages, because Scala borrows a lot from ML-like functional languages but doesn't really leave much out from Java, and then adds a few things along the way.

If you are not too familiar with functional paradigms, many of the code examples seems obscurely clever. The nice thing about Scala is there is always a procedural way of doing the same operation that is more digestible for most people. I find the trend in developers coming to Scala from languages like Java/Ruby/Python/etc is to begin with the latter and gradually improve technique toward the former.
my primary barrier is maven (I'm coming from Ruby and gems).

I wonder why the sbaz (Scala-Bazaar package manager) is not the default, rather than maven.

In theory you can use any Java class/library. However, in practice this can be quite painful, given the type conversions you'll have to do everywhere the two touch. There are 'implicit' conversions for many base types, but when it gets a bit more complex, you'll have to write your own conversions, especially from Scala->Java.