Hi,
I’ve been working with ruby for about 6 months now on and off but the majority of my development is still in C#. So i’ve been keen to try out the possibility of using IronRuby with C#. I think the mixture of both langauges is compelling as there’s cases where a dynamic language is a better choice, more flexible and faster (development time).
Also with ruby there’s a really good opportunity to build internal DSL’s fast, and with an elegant end product. You only have to look at ActiveRecord in rails:
class Post < ActiveRecord::Base
has_many :comments
validates_presence_of :text
...
end
class Comment < ActiveRecord::Base
belongs_to :post
...
end
and RSpec:
describe "(empty)" do
it { @stack.should be_empty }
it_should_behave_like "non-full Stack"
it "should complain when sent #peek" do
lambda { @stack.peek }.should raise_error(StackUnderflowError)
end
it "should complain when sent #pop" do
lambda { @stack.pop }.should raise_error(StackUnderflowError)
end
end
to be fair with the increasing number of fluent interface API's in the .net world the drive towards more understandable code is not the preserve of the dynamic people. With tools like StructureMap,
registry.AddInstanceOf<IWidget>()
.WithName("DarkGreen")
.UsingConcreteType<ColorWidget>()
.WithProperty("Color").EqualTo("DarkGreen");
we get a very intuitive, understandable API which is also a DSL as far as i'm concerned. But i still believe that ruby's looser syntax allows us to build nicer looking DSL's
I guess ultimately it'll come down to how easy it is to use IronRuby with C#, how good the tooling is, for example RubyMine is a ruby IDE from Jetbrains (resharper) which provides refactoring support and with these guys on the case i feel confident that the ruby refactoring story will only get better.
I did a talk on Ruby/IronRuby for skillmatter a while back and speaking to everyone at the talk there was a consistent message, we like/love ruby, love the tools available, rspec, cucumber, rake etc but we really need stability & ide support.
Its arguable whether you need an ide, i used textmate for the majority of my rails dev, however i did find it alot easier once i started to use it in combination with rubymine. Textmate for cranking out the code (its gr8, no clunky huge ide in the way), but when things got messy (i.e. i couldnt figure out a problem) i was able to boot up rubymine and get the full visual studio like experience with debugging, break points, watches, hover over variables etc, all that good stuff.
So if we get this for IronRuby i.e. a texteditor (which there are already loads of, e.g. e-editior, notepad++ etc) and full visual studio support I think people would jump all over Ruby/IronRuby.