[article] Language Design Deal Breakers

Timon Gehr timon.gehr at gmx.ch
Sat May 25 19:39:13 PDT 2013


On 05/26/2013 02:14 AM, Jonathan M Davis wrote:
> On Sunday, May 26, 2013 01:54:36 Timon Gehr wrote:
>> On 05/26/2013 01:39 AM, Jonathan M Davis wrote:
>>> On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte wrote:
>>>> I think this have not been posted yet around here but might be
>>>> interesting
>>>> to the D community as it is actually criticizing several languages
>>>> including D but with an interesting aproach:
>>>>
>>>> http://sebastiansylvan.wordpress.com/2013/05/25/language-design-deal-brea
>>>> ker s/
>>>
>>> Interesting article, with a lot of good points, though I don't at all
>>> agree
>>> with his take on unit testing or null pointers.
>>>
>>> - Jonathan M Davis
>>
>> What is there to disagree with about the null pointer issue?
>
> I completely disagree that null pointers are a problem.

They are not. It's dereferencing them that is the problem.

> I don't even remembe the last time that I dereferenced a null pointer in my code,

That's hardly an argument.

> and I think that null can be extremely useful.

Yes; Why is this relevant?

> And yet for whatever reason, there are quite a
> few people who seem to think that it's a great cause for bugs.

/great/gratuitous/s

> Clearly, they're doing something differently than I do.
>
> Regardless, I don't really want to get into that (there was a discussion on it
> quite recently). Suffice it to so that I don't find null pointers to be a problem
> and am confused at how so many people manage to have problems with them.
>

Null pointer dereferences simply do not make any sense.

This is what you are arguing for:

class C{ void foo(){ } }
void main(){
     C c = null;
     c.foo();
}



More information about the Digitalmars-d mailing list