Optional syntax for implements and extends

Francois Green francois.green at gmail.com
Fri Feb 1 00:25:44 UTC 2019


How badly would Java break if one could optionally replace extends or
implements with a colon?

    interface I {}
    static abstract class C { }
    static class A extends C implements I { }
    static class B extends C implements I { }
    //vs
    interface I;
    static abstract class C { }
    static class A : C, I { }
    static class B : C, I { }

>From the first version above, one can easily infer that C is a class and I
is an interface.  But what does knowing this help me to achieve?  For those
us who only consume libraries, it would be nice to not have to type all
that if we didn't need or care to.  Plus think of the reduction in carpal
tunnel cases that having this option might bring about.


More information about the amber-spec-comments mailing list