Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
t; *From:* ironruby-core-boun...@rubyforge.org [mailto: > ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Friday, January 09, 2009 2:33 PM > *To:* ironruby-core@rubyforge.org > *Subject:* Re: [Ironruby-core] Generic method synxtax > > > > How would this loo

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Jimmy Schementi
-core@rubyforge.org Subject: Re: [Ironruby-core] Generic method synxtax How would this look for instantiating a generic object? my_object = Foo.method(:new).of(Bar).call That seems strange. Perhaps we need to possibilities: the above for generic methods and the following for generic classes: my_o

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Tomas Matousek
Generic types already work: List = List.of(Object).new Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ryan Riley Sent: Friday, January 09, 2009 2:33 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Generic method synxtax

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
How would this look for instantiating a generic object? my_object = Foo.method(:new).of(Bar).call That seems strange. Perhaps we need to possibilities: the above for generic methods and the following for generic classes: my_object = Foo.of(Bar).new # where Foo would be defined as Foo in C# my_c

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Jimmy Schementi
lf Of Ryan Riley Sent: Friday, January 09, 2009 1:51 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Generic method synxtax I like Tomas's idea the best. Generics are not native to Ruby, so most people using them will likely have a C#/VB background, which means Tomas's s

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
I like Tomas's idea the best. Generics are not native to Ruby, so most people using them will likely have a C#/VB background, which means Tomas's syntax would be more familiar. The "_of" syntax isn't bad, but forcing a ".do" or ".call" at the end isn't ideal, even if it does have a bit of a Ruby f

[Ironruby-core] Generic method synxtax

2009-01-08 Thread Shri Borde
Another suggestion is to use name mangling to append "_of" to the method name. This could return an object with a method called "do", "call", or something like that. Since we already do name mangling from PascalCase to under_scores, this could work out. It avoids having to pass the type paramete