[IronPython] Similarity with builtin types

Jeff Hardy jdhardy at gmail.com
Mon Aug 9 23:34:25 CEST 2010

On Mon, Aug 9, 2010 at 3:17 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Jeff wrote:
> There's also 1 limitation which occurs to me:  We will only allow extension
> methods which don't clash on the base class to appear.  So for example if you
> define:
> class MyClass : IEnumerable<object> {
>        public void Where() {
>        }
> }
> Then the extension Where won't be available.  Unfortunately I think that's the
> only way we can really do this efficiently.  Of course you'll still be able to
> call System.Linq.Enumerable.Where.
> Sound reasonable?

I think so. There might be a few cases where that could cause some
confusion, but those are probably poorly-designed extension methods
anyway - generally the in-class version would be preferred to the
extension method.

- Jeff

More information about the Ironpython-users mailing list