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


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.

| 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

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.

| improve this answer | |

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


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.

| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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