Deprecate C style declerations?

Lars Ivar Igesund larsivar at igesund.net
Fri Dec 29 06:53:33 PST 2006


Don Clugston wrote:

> Daniel Keep wrote:
> 
>> (As for C-style declarations, it means you can copy+paste a whole bunch
>> of C declarations into D source.  Yes they can be converted, but this is
>> as simple as it gets.  If it's no extra work for Walter, why remove it?)
> 
> Really, you can't just copy and paste. You need to change typedef to
> alias, you need to change enums, etc.
> It is just supporting a bad habit.
> Reasons to remove it:
> * Makes code harder to read -- it is currently possible to mix C-style
> and D style declarations in a single block of code. That's disgusting.
> * Complicates the compiler, and means that any D parsing tool also has
> to parse C declarations.
> * Probably restricts future language options, because of ambiguities
> that it introduces.
> 

Yes, I believe this has been discussed before, although at greater lengths.
I can't remember that there has been any particularly convincing arguments
in the past, and the only reason I can think of, is for C source conversion
easiness. I think it is a bad reason.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d mailing list