A few questions

Namespace rswhite4 at googlemail.com
Fri Jul 27 11:07:56 PDT 2012


> Walter's stand on this is that the OS gives you 
> null-dereferencing detection -
> i.e. segfaults and access violations. He's not going to add 
> extra syntax for
> it.
>
> - Jonathan M Davis

That is a huge mistake. My OS prints me only a funny "Access 
violation". And so i can search for my little null reference by 
myself. I _must_ debug for a ridiculous null reference. That cost 
time. I have not even a filename or a line number. Only the 
message that something went wrong. And all other i have to find 
by myself. So much time for such little mistakes.

Why would Walter have a language which doesn't support good error 
handling?
D hasn't support for unused variables, unused imports and even 
not for null references. Why should everyone use D instead of any 
other language?
If i have a big project and i use many objects and one of them 
change to null, what now? Should the user really step through 
thousand lines of code because D prints only "Access Violation" 
without any further information? Or should i use the same 
principle as Java, and write every time again pre- and 
postconditions? I don't see any reasons why anybody should 
realize a big project with D and not with a other language, if 
the error handling and not null support remains as it is. Sorry.

To reject even a such handy shorthand is incomprehensible to me.


More information about the Digitalmars-d-learn mailing list