On Sat, Jan 4, 2014 at 1:03 AM, Ben Kloosterman <[email protected]> wrote:


> let me start static members of interfaces have never been discussed
> because they make no sense because the interface type is never used.
> - There is a this method which is unused
> - There are no constraints .Its the constraints or type relations that
> give it meaning.
>

Right. Though adding static methods hardly seems like rocket science. They
actually have nothing to do with the interface at all. In a simple view
they are merely global procedures that live in the *namespace* defined by
the Interface. In that view it's merely a human convenience to allow static
methods in an interface.

But if interfaces are parametric, and can have distinct implementations at
different types, then of course the static methods can also have distinct
implementations at different types. In that case the static methods act as
a form of constrained *ad hoc* overloading in exactly the way that type
class methods do.


shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to