Skip to content

Tag Archives: structural-typing

Two structural additions to C#

28-Apr-10

In What’s in a name? (C#’s hidden support for structural typing) we explored a few of the areas in which C# currently supports structural typing. I would like to propose two new additions to C#’s structural typing abilities: implicit interface inheritance and richer generic constraints. Implicit interface inheritance I propose that class or struct ought [...]

What’s in a name? (C#’s hidden support for structural typing)

27-Apr-10

C# is well known for its nominative type system. This means that C# identifies types and their relationships based on their names. That is why C# does not allow you to create two types with the same name, even if they have a different public interface – the C# compiler only cares about the name [...]