On Wednesday, 3 April 2013 at 09:44:23 UTC, Lars T. Kyllingstad wrote:
I don't see the incompatibility. This is exactly the purpose of final switch. If the user didn't want to be forced to handle a new error category, they'd use normal switch instead.


This is a good thing in your own code. But in phobos, this is a guarantee to break a lot of user code when adding to the enum.

You have yet to specify the problems with switch in OOP. Maybe you meant something else, that final switch doesn't solve?


The idiomatic way to execute code depending on a value in OOP is virtual dispatch.

Reply via email to