"bearophile" <[email protected]> wrote in message
news:[email protected]...
Ary Borenszweig:
Why, of course, the C syntax for types:
int (*x[5])[3];
int (*x)(char);
int (*[] x)(char);
*Ugh*...
Try porting code that uses heavily n-dimensional tensors from C to
D, and you understand why supporting the C syntax for arrays (with
inverted coordinates in the definition) is a godsend :-)
That sounds like a case of wanting to use D for legacy apps. I'm not sure
that we really need C syntax for that, especially considering that legacy
apps are one thing in the "Who D is Not For" list.
This syntax ought to be at least deprecated soon, and eventually removed.
Somebody recently exposed an ambiguity in D's syntax due to this legacy: is
Identifier ( * Identifier ) ( Identifier ) ;
a declaration of a function pointer or a call to a function returned by a
function?
Stewart.
--
My e-mail address is valid but not my primary mailbox. Please keep replies
on the 'group where everybody may benefit.