The Source for Java Technology Collaboration
User: Password:
Register | Login help    

Search

Online Books:
java.net on MarkMail:


Whooshing Sounds

Posted by dwalend on September 9, 2006 at 8:54 AM PDT

Back in May I blogged about simplifying my generics code with dot accessors to the type parameters, to simplify code that currently looks like this:


public class FloydWarshall<Node,
                            Edge,
                            Label,
                            BaseDigraph extends IndexedDigraph<Node,Edge>,
                            LabelDigraph extends IndexedMutableOverlayDigraph<Node,Label,Edge,BaseDigraph>,
                            SRing extends Semiring<Node,Edge,Label,BaseDigraph,LabelDigraph>>

into something more like this:


public class FloydWarshall<SRing extends Semiring>

The request for enhancement made it into Sun's database. Seven of you voted for it in as many hours. Thanks.

I also had what I think was a revealing back-and-forth with a Sun engineer. I'm a bit disappointed it ended as quickly as it did, but I hope my suggestion planted some seeds for further thought about how the Generics language features can mature. I think the dialog in the RFE makes interesting reading.

Related Topics >> J2SE      
Comments
Comments are listed in date ascending order (oldest first)