On Friday, 31 August 2012 at 15:41:10 UTC, Steven Schveighoffer
wrote:
On Fri, 31 Aug 2012 00:54:07 -0400, Mehrdad
<[email protected]> wrote:
On Thursday, 30 August 2012 at 19:00:58 UTC, Steven
Schveighoffer wrote:
And I edit x.h, how does it know the original source file
which includes x.h does or doesn't define A before including
x.h? That is the issue I was having.
I don't understand why that should be so difficult...
Why can't the IDE just scan all the #include dependencies in
an internal database, and update them accordingly?
a.c:
#define A
#include "x.h"
b.c:
#include "x.h"
Now, depending on whether you are editing x.h in terms of a.c
or b.c, the #ifdef is active or not. The IDE will be wrong no
matter what choice it makes.
This is why I like how external definitions and imports cannot
affect D modules.
-Steve
Ooh I see.
The IDE could just give you a warning though, and ask which ones
you want to rename. It might be "wrong" but it'd still be very
usable.