default branch placement in switch

Dan Smith daniel.smith at oracle.com
Fri Dec 15 20:01:45 UTC 2017


> On Dec 14, 2017, at 12:42 PM, Guy Steele <guy.steele at oracle.com> wrote:
> 
> I think this is the right approach.
> 
> An alternative that should at least be considered would be to further simplify the statement of the exception by eliminating the mention of legacy types:
> 
>  - For switches which have only constant case labels (and "default"), we relax the above rule regarding default. 

+1

This rule looks like we could have come up with it when designing the language from scratch, while the more constraining rule screams "historical reasons".

—Dan



More information about the amber-spec-observers mailing list