Runtime: Bring back Assembly Neutral Interfaces

Created on 31 Dec 2016  路  9Comments  路  Source: dotnet/runtime

We were very close to achieving loose coupling in .NET via Assembly Neutral Interfaces... then victory was snatched from our grasp with its removal in 2015. I know this would also need to be added to .NET Full, but it is a very worthwhile feature.

Diamond dependencies are a problem, MxN adapter proliferation is madness, and this is a pain point even for basic tasks. This small thing would represent a significant reduction in pain/friction for OSS authors seeking interoperability with other packages. We're tired. We want our time and keystrokes to go farther, and preferably while remaining on .NET

True structural typing has been suggested for C#, but it looks like this is unlikely to get any attention. foreach + GetEnumerator alone gets this special ability. ANI consumption was supported by all CLR languages.

If the NuGet ecosystem is never able to expand past the interfaces in System.*, how will we ever start making progress on library compatibility?

Adding dependencies just for interface assemblies does not happen, particularly if interoperability is not absolutely crucial. It's not worth the risk and cost.

I'd like to reiterate the comments when the supporting ~900 lines of code for ANI were pulled.

"BOOOOOOOO!" - @ChrisMcKee
"Why?" - @adamralph
"yeah, whats with this?" - @Jetski5822
"NOOO!" - @markrendle

And kindly request that this feature be reconsidered for inclusion in both versions of .NET.

area-TypeSystem-coreclr enhancement

Most helpful comment

The ANI prototype had bad performance characteristics. It would be performance disaster if it gets used broadly in the form that it was implemented.

@davidwrighton and @jaredpar are looking into how to do it properly.

All 9 comments

The ANI prototype had bad performance characteristics. It would be performance disaster if it gets used broadly in the form that it was implemented.

@davidwrighton and @jaredpar are looking into how to do it properly.

That's the first I'm hearing about this and it makes me very happy 馃槉

@jkotas Is there an issue to track this or anything to share (even thoughts) at this point?

I, for one, look forward to killing LibLog.

Is there any update on this @davidwrighton and @jaredpar ? Is there somewhere we can track the progress of the new feature ?

@graemechristie no updates as of yet. A couple of other items have priority at the moment. Going to switch back to ANI / other type system innovations later in the summer.

Are there any more updates on this @davidwrighton and @jaredpar ?

Would love to see some movement on this one. I think it can be big to grow the ecosystem more easily and achieve quicker agreements on shared contacts.

I guess now that .NET is going to be a single platform (.NET 5) and no more .NET Framework, this will be easier?

I plan to revisit this for the post .NET 5 world. Still heads down on .NET 5 at the moment though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nalywa picture nalywa  路  3Comments

sahithreddyk picture sahithreddyk  路  3Comments

noahfalk picture noahfalk  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments