开发者

Ruby vs Scala - pros and contras of each one [closed]

开发者 https://www.devze.com 2023-04-13 05:49 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answe开发者_如何转开发rs to be supported by facts, references,or expertise, but this question will likely
As it currently stands, this question is not a good fit for our Q&A format. We expect answe开发者_如何转开发rs to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

What benefits and limitations has Scala language comparing to Ruby, especially from the web applications developer point of view? Comparison charts and proof-links are strongly welcome.

P. S. This is not a holy war question (-:


I've been working with Ruby and Rails for over 2 years and I'm just about a month into learning Scala and Lift, so my opinion is probably biased, but here it is.

Ruby makes you feel amazing. Every new thing I discovered about the language made me giggle like a little schoolgirl. Working with gems is really simple and with Bundler and Gemfiles it is probably the best library management system I've came across.

There are loads of gems for everything, from API wrappers, to complex authentication/authorization.

Ruby also has amazing community that will make learning the language really really easy. Take RailsCasts by Ryan Bates for example. If you watch them, you will learn how to do web development with Ruby and Rails.

For me, Ruby is probably the best thing I've discovered in my whole programming life, because the way the community works made me change my whole approach to programming.

On the other hand, I don't see this in the Scala world. I don't want to raise a flame war, but this is just my impression after just starting to learn the language. In Ruby community, everything felt so engaging and made me wanna learn more and more. But with Scala, I tend to run into a lot of obstacles and not as much documentation and tutorials, that would help me overcome them.

There are tons of books devoted to very specific topis on Ruby, be it scripting, deployment, testing, and bunch of other stuff (yes Pragmatic Programmers rule). The best thing is, that the whole community feels like a family, it's not the same as in the Java world, where everything is distributed and nobody talks to eachother, at least that's my impression.

So what this comes down to, at least for me, is how easy and engaging it is to get into the world of the language and start doing something, and Ruby is definitely a winner here, at least for me.

On the performance side, Scala is faster, no doubt about it. That's one of the reasons I'm getting into Scala, as it has really great concurrency model and allows you to do things that Ruby just can't do. But for most web applications, you won't need to do this.

Ruby is slow, that's the only downside there is. It is getting faster and faster, and for 98% of the cases you won't see it as a problem. But Scala is faster.

Ruby community also embraces testing and beautiful code, which naturally leads to better apps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号