PROPOSAL: Abstract enums (version 2)

Mark Thornton mthornton at optrak.co.uk
Fri May 1 01:35:49 PDT 2009


Howard Lovatt wrote:
> Derek,
>
> I have found also wanted to extend an abstract class when using enums.
> However I ideally didn't want to extend a special enum abstract class, e.g.
>
> abstract enum Super { ... } // Has enum
>
> enum extends Super { ... }
>
> But rather any old abstract class:
>
> abstract class Super { ... } // No enum
>
> enum extends Super { ... }
>
> What is the rational for only allowing abstract enum to be extended rather
> than a plain abstract class.
>
>  -- Howard.
>   
Because Enum isn't a trait as in Scala and existing enums are all 
subclasses of Enum?

Mark




More information about the coin-dev mailing list