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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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?

_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to