[Ironruby-core] IronRuby and XNA. Super and Generics

Tomas Matousek Tomas.Matousek at microsoft.com
Wed Nov 26 15:11:44 EST 2008

What if the method has signature m<T>(object x, ... T...). How do we know you don't want to pass the value of constant Texture2D as x? "of" would wrap it into an internal class that would be known as carrying generic parameter types and always unwrapped.

load_Texture2D clashes with name mangling and is not composable. What if you want to call method with parameter Dictionary<string, List<object>>? With "of" you would do:

load of(Dictionary.of(System::String, List.of(Object))


From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mike Moore
Sent: Wednesday, November 26, 2008 12:02 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] IronRuby and XNA. Super and Generics

On Wed, Nov 26, 2008 at 12:04 PM, Tomas Matousek <Tomas.Matousek at microsoft.com<mailto:Tomas.Matousek at microsoft.com>> wrote:
I'm thinking of something like:

myTexture = content.load of(Texture2D), "mytexture"

I.e. we would add Kernel#of method that takes a list of classes/modules and returns a special object representing generic parameters that binder would use for selecting the right method.

We are open for more ideas.

Couldn't you just send in the constant? What would the Kernel#of method do for you?

myTexture = content.load Texture2D, "mytexture"

Or, could you use method_missing?

myTexture = content.load_Texture2D "mytexture"


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20081126/73e2a4a6/attachment-0001.html>

More information about the Ironruby-core mailing list