

Micro-Services: Clojure vs. Scala - gengstrand
http://glennengstrand.info/software/architecture/oss/scala

======
jodroc
sorry, but i cannot agree that someone may decide to go with clojure or scala
based on the fact that one has type inference while the other not. Specially
when you already have approaches to have type inference on clojure
[http://typedclojure.org/](http://typedclojure.org/). Both languages have so
much different concepts and ideologies on how to solve problems. To me it is
much more about the mindset that each requires you to apply while solving a
problem.

------
gengstrand
What do you mean by the term "mindset?" To me, that term usually implies a
kind of groupthink.

~~~
jodroc
I mean in terms of the philosophy behind it. A programming language is a tool
for thinking. And each language, fits better with some specific way of
thinking about a problem. So you are mastering a programming language when you
can adapt the way you think about the problem to fit the best characteristics
of that language. And i feel the discussion about using Scala or Clojure
should be more about that, and not so much about the amount of code needed to
write a program on each one, or the fact that one has Type Inference in its
nature, while in the other it is optional. Just my 2 cents ;)

~~~
gengstrand
I agree with your intentions; however, when comparing two languages, you need
some quantifiable basis for comparison. "Better fit" is very ambiguous and
hard to measure whereas code size is very specific and repeatable. I believe I
used something like this.

wc `find ~/git/clojure-news-feed/server/feed/src -type f -name ' _.clj '
-print | xargs`

wc `find ~/git/clojure-news-feed/server/feed/test -type f -name '_.clj' -print
| xargs`

wc `find ~/git/clojure-news-feed/server/feed2/src -type f -name '*.scala'
-print | xargs`

I used code size because you hear about that alot but I agree that it is a
very imperfect basis. Less code doesn't necessarily mean fewer bugs. When I
coded these two services, I wasn't thinking of code size at all.

