DIP33: A standard exception hierarchy
deadalnix
deadalnix at gmail.com
Wed Apr 3 08:33:52 PDT 2013
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.
More information about the Digitalmars-d
mailing list