Herb Sutter briefly discusses D during interview

Jonathan M Davis jmdavisProg at gmx.com
Tue Jun 7 18:30:15 PDT 2011


On 2011-06-07 17:53, Andrej Mitrovic wrote:
> I'm not sure what he means when he says that D doesn't simplify syntax.

He talked just before that about simplifying declaration syntax so that it 
reads left-to-right instead of right-to-left, and D didn't do that. For 
instance,

int[4][3] a;

declares a static array of length three where each element of that array is a 
static array of length 4 where each of those arrays holds an integer. It's 
read right-to-left and throws people off at least some of the time. Because, 
when you go to index it, it's used left-to-right

auto a = i[3]; //out-of-bounds

Herb Sutter was suggesting that it would be a big improvement to order 
declaration syntax such that it's read left-to-right (which apparently is what 
Pascal did, and apparently is what Go has done). D stayed closer to C and C++ 
and kept the right-to-left declaration synax. That's what he was referring to.

- Jonathan M Davis


More information about the Digitalmars-d mailing list