PROPOSAL: Static Methods in Interfaces (v1.1)

Marek Kozieł develop4lasu at gmail.com
Thu Mar 19 01:58:23 PDT 2009


2009/3/19 Howard Lovatt <howard.lovatt at iee.org>

> Hi,
>
> I think that waiting until we can add Traits/Mixins would be better
> than adding extension methods, glue classes, continuation methods, or
> static methods in interfaces (Traits would likely include static
> methods in interfaces). When I blogged about this stuff a while back:
>
>    http://www.artima.com/weblogs/viewpost.jsp?thread=220783
>
> There was not much enthusiasm for extension methods etc., but people
> did like Traits:
>
>    http://www.artima.com/weblogs/viewpost.jsp?thread=220916
>
>
>  -- Howard.
>
>

Some time ago I wandered about 'Trails', 'literal Traits' (same as Trails
but contains method as String and it's interpreted in inherited classes).

But after few talks about it I found that it's not good idea because:

1. When some one write method in class and then some Interface in .jar will
have added method with same signature, but designed for other purpose the we
will have hard to localize bugs.

2. If methods are compiled to Interface then then it's problem when you want
include interfaces to client side applet. Should u include all required
classes as well? It can be quite problem for peoples who write applets.
('literal Traits' are ok here)

-- 
Pozdrowionka. / Regards.
Lasu aka Marek Kozieł

http://lasu2string.blogspot.com/



More information about the coin-dev mailing list