Things that may be removed

Stewart Gordon smjg_1998 at yahoo.com
Sat Dec 20 16:35:43 PST 2008


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:gici0r$2d56$1 at digitalmars.com...
> 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. 




More information about the Digitalmars-d mailing list