On Fri, Nov 13, 2009 at 9:07 PM, Jimmy Schementi <jimmy.scheme...@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 me.

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
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to