We should deprecate C-style declarations

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 15 08:32:17 PST 2009


Don wrote:
> Before TDPL is published, I think we should finally get rid of C-style 
> declarations. Supporting two styles of declarations just causes 
> confusion, and AFAIK it doesn't have any benefits -- for example, it 
> doesn't significantly help in porting code from C. D declarations are 
> just better. And there are bugs such as this one, which seem to require 
> abandoning C declarations:
> 
> bug #2392 Parsing ambiguity between function pointer declaration and 
> function call
> 
> At the very least, can we make sure that TDPL doesn't commit us to 
> retaining them forever?

I agree. Walter and I agreed that TDPL will not even mention the C-style 
declarations for functions and arrays. There are a couple of other older 
features (such as "length" in array index expressions) that, again in 
agreement with Walter, TDPL does not mention and are on the road to 
deprecation.

Andrei




More information about the Digitalmars-d mailing list