在厌倦了以争论的方式说服我的同行放弃检查异常之后,我正在寻找任何统计数据来说明有多少程序员更喜欢检查异常,有多少人不想使用它们。
网上有这样的调查/投票/统计吗?
最佳答案
如何将他们指向 Java 教程:
http://download.oracle.com/javase/tutorial/essential/exceptions/runtime.html
最后一行清楚地总结了关键点:
Here's the bottom line guideline: If a client can reasonably be expected to recover from an exception, make it a checked exception. If a client cannot do anything to recover from the exception, make it an unchecked exception.
关于java - 检查与未检查的异常统计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4618437/