News for hackers. Stuff that matters.
Re:F# 4.0 Preview by noblethrasher on Thursday November 13, 2014 @05:16AM (#8600776)
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!
    }

There are no comments on this comment yet.