So, User-Defined Attributes

Walter Bright newshound2 at digitalmars.com
Sun Jan 6 23:58:01 PST 2013


On 1/6/2013 11:31 PM, Timon Gehr wrote:
> I am sure that very good progress is being made. However, the forward reference
> error problem will need formal treatment at some point. I think one reason they
> pop up is that symbol lookup for the intended language is inherently impossible
> to compute.

A huge source of fwd ref problems was not at all about symbol lookup. It was 
about partial types referencing properties of themselves. For example,

struct S {
     int a;
     int b = S.sizeof;
     int c;
}

for a simple example. There've been all kinds of variations on this theme, some 
of them wickedly complicated, but always boiling down to the same general issue.

Some forward ref regressions have cropped up because the compiler now does a 
better job of checking if there is enough of the type computed to get the 
desired property. Formerly, it would just return an incorrect size (for 
example). (I do not know if this is the case for your example, yet.)


More information about the Digitalmars-d mailing list