Search code examples
.netrubyironruby

Theoretically speaking, I can use IronRuby to write all apps that c# can write, right?


I know some ruby language. Now I need do some .net development. I don't want to learn a new language. So, after googling I got IronRuby. Now my question is Can I use IronRuby to write all apps that c# can write?

Thanks.


Solution

  • Broadly speaking, I believe you should be able to do almost anything you can do in C#. However, there may be some areas where C# makes things easier for you - the framework was certainly designed with statically typed languages in mind.

    One area which does raise a spectre is LINQ. I don't know whether IronRuby supports expression trees at all directly. You could create them manually of course, but that would be a pretty poor experience. Likewise I don't know what IronRuby would do about inferring the relevant delegate types for LINQ to Objects etc.

    Don't be too afraid of learning a language: it's an experience which can broaden the mind significantly. Given that you're already going to have to learn the .NET framework to at least some extent, you might as well learn the language which most of the examples of the framework are written in. If this is a reasonably large project, I suspect that overall you'll save time - and, of course, have a broader knowledge as a result.

    Another thing to consider is who's going to maintain the code base. You haven't said why you need to do this development - but if it's for a professional reason, presumably you'll either have colleagues or have to hand the code over to someone in the long run. Find out what their preference is.