3 ms·
I agree that it would be more idiomatic. I disagree that it is good. Abstract classes have disjunctive semantics (logical OR) whereas interfaces have conjuncti
by noblethrasher 12y ago
I agree that it would be more idiomatic. I disagree that it is good.
Abstract classes have disjunctive semantics (logical OR) whereas interfaces have conjunctive semantics (logical AND).
The actual important thing that I wanted to capture is that an instance of Shape can only be one kind of shape at a time. With an interface a class could be more than one kind of Shape.
interface IFoo : IShape
{
//some stuff
}
public class SomeShape : IShape, IFoo
{
//I am a circle AND a square!
}