On Thu, Jul 28, 2011 at 3:35 AM, Doug <beafd...@gmail.com> wrote: > On Jul 27, 1:25 am, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote: >> On Wed, Jul 27, 2011 at 5:07 PM, Doug <beafd...@gmail.com> wrote: > > I see checked exceptions as a compile-time reminder that it's always a > good idea to handle potential errors. This is almost exactly the same > concept as diligently checking the return codes from C functions that > can fail. I suppose if you are the kind of engineer that doesn't make > a priority of checking return codes, then you probably also don't like > Java forcing you to do something with potential error conditions. >
You are making too many assumptions, but have fun with it. I actually write all of my C code in a giant main() function and I never ever check return codes. I am that good. I pass around NULL pointers like crazy, but it's OK, because I'm a lucky guy. Satisfied? > If you are that kind of engineer (and I would argue that you are not > actually an "engineer"), then don't use Java. Java is old. And because it's 'enterprise', it won't change much. Checked exceptions is not the only problem with it. So yes, when possible, I use more modern alternatives. > >> The whole point is, that with checked exceptions you are forced to >> handle or re-throw/declare them even if you don't what to do that >> *in that particular part* of your code. Nobody is saying 'we will >> ignore all exceptions and keep our fingers crossed'. > > Truthfully, how often do you really NEED to ignore checked > exceptions? It does come up, but not enough for me to get upset that > I have to do it. For me, it's a few extra lines of code in a few > places. Again, I never said ignore. I said 'don't handle in that particular place'. A few extra lines of code multiplied by a hundred places makes for a lot code bloat. Don't you just love it when you have to handle IOException when calling close()? We can go on forever, but there's not much point. Have fun with your exceptions. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en