Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


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 ;)


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: