[IronPython] Plans for overloads?
korpse-ironpython at kaydash.za.net
Wed Jul 20 08:02:42 CEST 2005
Keith J. Farmer wrote:
> How would you specify:
> T4 Foo<T1, T2>(T1, T3)
> T4 Foo<T1, T2, T3>()
> T4 Foo<T1, T2>(T3)
> T4 Foo<T1>(T2, T3)
> T4 Foo(T1, T2, T3)
One would expect the first set of s to classify the generic type and
the second set to specify the exact overload. This seems like the least
complicated solution (to me, anyway).
> I think you may need to add something to specify this, eg:
> Foo[T1, T2 | T1, T3](x1, x3)
> Foo[T1, T2, T3]()
> Foo[T1, T2 | T3](x3)
> Foo[T1 | T2, T3](x2, x3)
> Foo[ | T1, T2, T3](x1, x2, x3)
That is really not very pretty to look at.
More information about the Ironpython-users