On Sun, Jan 5, 2014 at 3:58 AM, Jonathan S. Shapiro <[email protected]>wrote:

> 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.
>

Correct.  They dont logically belong there and they dont even need to be in
the namespace..( though they should) .

>
> 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.
>
> Yes and thats the real leap , generics  were already getting constraints
and interfaces could use them.

Now as i asked on freenode just have to work out what an interface with
both methods and static functions is ...

Also should traits and interfaces have the same syntax  and add a static
modifier for functions . This could really help people from Java /C# .

Ben

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

Reply via email to