DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

Ary Borenszweig ary at esperanto.org.ar
Wed Jun 12 14:30:23 PDT 2013


On 6/12/13 6:26 PM, Walter Bright wrote:
> On 6/12/2013 2:21 PM, bearophile wrote:
>> Jonathan M Davis:
>>
>>> What I find most interesting about checked exceptions is the fact
>>> that almost
>>> everyone thinks that they're a fantastic idea when they first
>>> encounter them
>>> and yet they're actually a bad idea. It's actually a good example of
>>> how a
>>> feature sometimes needs to be thoroughly field-tested before it
>>> becomes clear
>>> how good or bad it is.
>>
>> Maybe checked exceptions are bad only for the type system of Java.
>> Maybe for a
>> language that has global type inferencing on the exceptions such
>> feature becomes
>> better.
>
> It's not just Java specific. Bruce Eckel wrote a wonderful piece on why
> exception specifications *cause* bad code to be written.
>
>
> http://www.mindview.net/Etc/Discussions/CheckedExceptions

Do you think the same will happen if the compiler tracks possible null 
references and whenever you might have a null pointer exception you are 
forced to handle it? (provided that the compiler is smart enough to know 
when a variable can't be null for sure, for transforming the code to SSA)


More information about the Digitalmars-d-announce mailing list