2 Syntax hints!
source | link

The big hint is in your question: "interface inheritance".

Basically, an interface is nothing but a set of method signatures. In a traditional OOP language, the only thing a class needs to do to satisfy an interface is to have implementations of those method signatures, and declare that it implements the interface. Since it's not inheriting implementations, there's no ambiguity or contradiction in having a single class implement several interfaces at once, or having several classes implement the same interface with different underlying data or algorithms.

For instance, here's some trivial Java code that declares a class which implements several other interfaces, and thus has all of their types at the same time:

public interface A { void a(); }
public interface B { void b(); }
public interface C { void c(); }
public interface D { void d(); }

public class IAmManyTypes implements A, B, C, D {
  public void a() {}
  public void b() {}
  public void c() {}
  public void d() {}
}
public interface A { void a(); }
public interface B { void b(); }
public interface C { void c(); }
public interface D { void d(); }

public class IAmManyTypes implements A, B, C, D {
  public void a() {}
  public void b() {}
  public void c() {}
  public void d() {}
}

The big hint is in your question: "interface inheritance".

Basically, an interface is nothing but a set of method signatures. In a traditional OOP language, the only thing a class needs to do to satisfy an interface is to have implementations of those method signatures, and declare that it implements the interface. Since it's not inheriting implementations, there's no ambiguity or contradiction in having a single class implement several interfaces at once, or having several classes implement the same interface with different underlying data or algorithms.

For instance, here's some trivial Java code that declares a class which implements several other interfaces, and thus has all of their types at the same time:

public interface A { void a(); }
public interface B { void b(); }
public interface C { void c(); }
public interface D { void d(); }

public class IAmManyTypes implements A, B, C, D {
  public void a() {}
  public void b() {}
  public void c() {}
  public void d() {}
}

The big hint is in your question: "interface inheritance".

Basically, an interface is nothing but a set of method signatures. In a traditional OOP language, the only thing a class needs to do to satisfy an interface is to have implementations of those method signatures, and declare that it implements the interface. Since it's not inheriting implementations, there's no ambiguity or contradiction in having a single class implement several interfaces at once, or having several classes implement the same interface with different underlying data or algorithms.

For instance, here's some trivial Java code that declares a class which implements several other interfaces, and thus has all of their types at the same time:

public interface A { void a(); }
public interface B { void b(); }
public interface C { void c(); }
public interface D { void d(); }

public class IAmManyTypes implements A, B, C, D {
  public void a() {}
  public void b() {}
  public void c() {}
  public void d() {}
}
1
source | link

The big hint is in your question: "interface inheritance".

Basically, an interface is nothing but a set of method signatures. In a traditional OOP language, the only thing a class needs to do to satisfy an interface is to have implementations of those method signatures, and declare that it implements the interface. Since it's not inheriting implementations, there's no ambiguity or contradiction in having a single class implement several interfaces at once, or having several classes implement the same interface with different underlying data or algorithms.

For instance, here's some trivial Java code that declares a class which implements several other interfaces, and thus has all of their types at the same time:

public interface A { void a(); }
public interface B { void b(); }
public interface C { void c(); }
public interface D { void d(); }

public class IAmManyTypes implements A, B, C, D {
  public void a() {}
  public void b() {}
  public void c() {}
  public void d() {}
}