Skip to content

Bring back Assembly Neutral Interfaces #7176

Open
@lilith

Description

@lilith

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.

Metadata

Metadata

Assignees

Labels

area-TypeSystem-coreclrenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions