Hacker Newsnew | comments | show | ask | jobs | submit login

Well, if your interest is to release on Android in the immediate future, you may be best served by sticking to Scala. Clojure code needs to bootstrap itself at start-up which creates a bit of a load delay on the initialisation of your app. If you want to just throw up a splash screen and not worry too much about the load time, Clojure may work out fine.

At this point, I have written significant amounts of code in both languages, and I honestly prefer Clojure. Scala is definitely a big step up from Java, and there is a lot to like in the language. Nonetheless, I think that Clojure is a step up from Scala.

There have been a number of times when writing in Scala that I wish I had some of the features of Clojure, macros in particular. Scala provides many neat features that would be implemented as macros in Clojure, but there are some things that can be done as macros that cannot be done in Scala.

Of course, typing is a big issue. I'll have to admit that when writing client code static typing is very nice, but when writing library code dynamic typing makes things easier. Most importantly, Scala suffers from some of the typing problems that are part of the JVM, most notably: type erasure in generics. Scala provides some means to reify generic types, but it is still a pain to work with. I think that Clojure also contains superior polymorphic dispatch capabilities.

In the end, they are both fine languages. I enjoy coding in Scala and Clojure more than C++ or Java. Still, if I have the choice between the two, I'd go for Clojure.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: