On Friday, 11 April 2014 at 12:21:59 UTC, Steven Schveighoffer wrote:
Idea just came to me. What about notifying the compiler which enums can be used in final switches (and perhaps should be more stringent in allowing math operations):

final enum name { ... }

-Steve

I unerstand what you are trying to do here. You are solving a political problem, with a solution that is inferior (but won't require anyone to be proven wrong, so that have greater chance to be accepted).

The problem is that is increase language complexity, plus make the most common use case of enum nit the most direct, obvious one. It is going to break every single piece of code that use final switch. And the default behavior of enum still remain a useless 3 headed monster, that could be created as a library solution, and that nobody really want anyway.

No.

Reply via email to