On 12/15/2011 05:47 PM, Don wrote:
On 10.12.2011 12:17, Timon Gehr wrote:
On 12/10/2011 10:54 AM, Bernard Helyer wrote:
On Saturday, 10 December 2011 at 09:47:14 UTC, Timon Gehr wrote:
On 12/10/2011 10:40 AM, Bernard Helyer wrote:
We intend to be compatible with DMD to a point. Where we are not, will
be through omission. Off the top of my head:
[...]
*D's forward reference and module order bugs will not be supported.

[snip.]


How is that an 'omission'?

Just my lame attempt at humour. :P

Should have thought of that. =)
Do you already have a working design? I think what Don suggested
(process static if and mixins in sequence, everything else on by need
basis) does not work in the general case because you can have static if
and mixin declaration dependencies across module import cycles.

Do you have an example? Would be good to discuss.

OK:

---
module a;
import b;

static if(!is(typeof(be))){
    enum not_be=1;
    pragma(msg,"not to be!");
}
---
---
module b;
import a;

static if(!is(typeof(not_be))){
    enum be=1;
    pragma(msg,"to be!");
}
---
---
$ dmd a b -o-
to be!
$ dmd b a -o-
not to be!
---


The compiler should reject it. There is no correct way to compile it.







Reply via email to