[IronPython] Plans for overloads?

Keith J. Farmer kfarmer at thuban.org
Wed Jul 20 18:42:08 CEST 2005


Illustrating my concern with indexers:

delegate Foo DelegateType();
public static DelegateType this (Type type) { }
public Foo<T>() { }

x = Foo[typeof(int)]() .. is ambiguous.  You can't determine if you've
called the constructor, or if you've called the static indexer, passing
in the int type, and then executing the delegate returned to get a Foo
object to store in x.

(forgive the C# bias in the typeof.. I can't recall the equivalent in
python)

-----Original Message-----
From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Keith J. Farmer
Sent: Wednesday, July 20, 2005 9:26 AM
To: Discussion of IronPython
Subject: RE: [IronPython] Plans for overloads?

I didn't see a second set of square brackets.  Also, what if what you
have is an indexer, in which case the parameter is supplied also with
square brackets?




More information about the Ironpython-users mailing list