Proposed improvements to the separate compilation model
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Jul 25 09:45:14 PDT 2011
On 7/25/11 11:19 AM, Steven Schveighoffer wrote:
> On Fri, 22 Jul 2011 18:06:19 -0400, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> A chat in IRC revealed a couple of possible improvements to the
>> development scenario in which the interface file (.di) is managed
>> manually and separately from the implementation file (.d).
>
> I have mixed feelings on this proposal.
>
> On one hand, one of the best parts of D over C++ is it's module system.
> No more #ifdef __thisfile_included crap, and implementations just sit
> right where they are defined. My concern with such an improvement is
> that it would encourage people (especially C++ coders) to unnecessarily
> split their implementation from the definition. I think there have been
> at least 2 or 3 people ask how to do this in D. I really like that
> implementation and definition are all in one file, and cannot be out of
> sync (a common problem with C++). Already di files allow for these
> problems to creep back in, but I understand it's a necessary evil.
Once we accept that, we should also acknowledge its big issues and fix
them. The current .di model is marred by numerous problems.
Andrei
More information about the Digitalmars-d
mailing list