Hacker News new | ask | show | jobs
by the_af 3749 days ago
I assume you know this, but it warrants saying explicitly: Scala is statically typed, while Python and Ruby aren't. This has immediate practical implications which for many people (on both sides of the divide) are A Big Deal.

In terms of elegance and succinctness, Scala is somewhere in the middle between Java's bureaucratic verbosity and Python's terseness.

2 comments

Scala code will generally have a slightly lower LoC than Ruby IMO. Maybe 20% overall typically. And the lines will be longer.

Ruby forces new lines for many expressions that Scala doesn't. (Think class with accessors vs a typical case class.) as things get more advanced, Scala allows you to express things that can be very difficult or awkward in Ruby. Like function composition, currying, pattern matching.

There's not really a case where a Ruby program will typically be shorter than a Scala program (well, excluding imports since there's no shared global namespace in Scala), even if you're avoiding typelevel style programming.

Yes, I used to mainly work with Java, but now mainly Python. I was wondering if "best language going" had considered these two languages.
Yes - I have substantial experience with both. The differences from those are wider (and the advantages - or what others may see as disadvantages - clearer) - I felt it was more useful to compare against more similar languages where people would be more likely to be choosing between them.