[Ironruby-core] Calling a C# static from IronRuby

Orion Edwards orion.edwards at gmail.com
Fri Nov 13 16:50:28 EST 2009

> On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi <Jimmy.Schementi at microsoft.com 
> > wrote:
> FYI, we’re thinking about allowing you to use “include” with .NET  
> types, which will include it’s static methods. That would enable:

I'd be very much in favour of this. A .NET static class full of static  
methods always seemed like it would be a good map to a ruby Module to  

Whether you want to limit the 'include' functionality to only work  
with static classes, or just work for static methods on any old class  
I think is up for debate.
I'd go for 'any old class', but I generally fall on the 'be as  
permissive as possible' side of the fence, so others may not agree :-)

> On 14/11/2009, at 9:29 AM, Ivan Porto Carrero wrote:
> I think Ruby on .NET is great and stuff like the clr_new, overloads  
> etc are a necessary evil to ease working with CLR classes.
> But I do think that changing a basic construct like include will not  
> be good unless the other rubies also include it. The reason for it  
> is you only use clr_new (which is aptly prefixed btw) or overload  
> etc when you're working with the CLR but include you use in other  
> implementations too and then it won't behave consistently across the  
> board.

While consistency with other Ruby implementations is obviously  
important, this is a CLR interop feature and shouldn't affect the  
normal ruby behavior of include, so I don't see how it affects  
consistency with other implementations at all?. It seems similar to  
being able to use include on .NET namespaces from IronRuby, which is  
of course also non-standard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091114/1d710c32/attachment.html>

More information about the Ironruby-core mailing list