On Monday, 20 April 2015 at 18:01:20 UTC, Jonathan M Davis wrote:
An array in C is a pointer, not a struct.

True. I only question the claim that they don't care about such things. Also difference between pointer and reference types seems to be no problem for STL string. If it wasn't designed by C programmers, then by whom?

So, the obvious thing for a C programmer when they see

if(arr)

would be to think that it was equivalent to

if(arr != NULL)

Don't you contradict yourself now?
arr!=null is equivalent to arr.length!=0

D tries to avoid segfaulting for null arrays

In fact nothing like that ever happened. Bug 14436 exists because there was never any special treatment for null slices.

Reply via email to