Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What benefits for the developer does the Ruby language have that are not available in C# (preferably with code examples)?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

Check this articles: What Is So Great About Ruby?, also don't miss Poor Man's Singleton Methods via Dynamic Wrappers in C# as answer to first article.

share|improve this answer
    
+1 on that "What Is So Great About Ruby?" article. Excellent read. –  H.Y. Oct 25 '10 at 17:26
    
Nick - thanks for the link. The article was really interesting and I can see why people rave over Ruby. Especially the mixins and duck typing. –  Sean Kearon Oct 25 '10 at 19:30
    
Glad to share :) –  Nick Martyshchenko Oct 26 '10 at 9:24
add comment

Ruby's extremely dynamic nature makes it very easy to create Domain Specific Languages. Ruby on Rails is the ne plus ultra of this aspect of Ruby as far as I know. RoR's ActiveMigrations is a DSL that takes a very difficult problem set and addresses it in a way that is easy to understand and to use. ActiveRecord, too.

share|improve this answer
add comment

C# is a great language. Ruby is an utterly remarkable one.

time_ago_in_words(3.minutes.from_now)

Returns "3 minutes". How many lines would this take in C#?

Ruby (and Rails, which actually implements that method) is about getting stuff done well, beautifully, expressively, and naturally.

share|improve this answer
7  
You can do that in one line of C# too. Define an extension method Minutes() on int that returns a DateTime, then an extension method FromNow() on DateTime. That would let you do (3).Minutes().FromNow(). The () are kind of a drag, though. Unfortunately C# doesn't support extension properties, just methods. –  munificent Mar 17 '11 at 6:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.