On Tue, 18 Feb 2014 11:11:36 -0500, Daniel Murphy <[email protected]> wrote:

"Steven Schveighoffer" wrote in message news:[email protected]...

> Of course, no compiler can make you write correct code. But if you're > going to write a default anyway, odds are you'll choose the right one.

I think your anecdotal experience with exception specification in Java is at odds with this expectation.

We all know programmers who are faced with seemingly annoyance hoops to jump through jump through them with the least possible effort.

It's not really the same, because silencing checked exceptions results in a solution that is worse than not having checked exceptions at all. Here if the programmer takes the 'easy route' and sticks in a "default: break;" they're just getting the old behavior back.

My point though, is that the change to require default gains you nothing except annoyed programmers. Why put it in?

I see your point that the difference between ignored exceptions and pass-through exceptions is a lot different than breaking by default on a switch statement. But I wasn't trying to make that comparison, just using it as an example of what programmers do.

The comparison I AM making is that we are implementation a requirement that will not achieve the behavior goal it sets out to achieve.

-Steve

Reply via email to