C# interview

Ary Borenszweig ary at esperanto.org.ar
Thu Oct 2 04:25:21 PDT 2008


bearophile escribió:
> Interview to Anders Hejlsberg, one C# author:
> http://www.computerworld.com.au/index.php/id;1149786074;fp;;fpid;;pf;1
> 
> This is one of the questions:
>> Would you do anything differently in developing C# if you had the chance?<
> 
> This part of the answer shows a future feature of D (note that Delight already has this):
> 
>> 50% of the bugs that people run into today, coding with C# in our platform, and the same is true of Java for that matter, are probably null reference exceptions. If we had had a stronger type system that would allow you to say that 'this parameter may never be null, and you compiler please check that at every call, by doing static analysis of the code'. Then we could have stamped out classes of bugs.

What's that feature in D?

If null references are the most problematic (and I must agree because I 
started a project in D and I got null referneces a few times already, 
but no other "bug"), why is it that in debug mode asserts are not put 
for every reference access, to show "somefile.d(58): Error: Null 
Reference" instead of just "Error: Access Violation"? :-(

No, instead you have to open a debugger to discover the file and line 
number... What's the point of losing that time?



More information about the Digitalmars-d mailing list