On 6 April 2012 13:23, Walter Bright <newshou...@digitalmars.com> wrote:
> On 4/6/2012 2:54 AM, Timon Gehr wrote: > >> Should add additional information to the type Foo. I don't see any issues >> with >> it, and not supporting it would be very strange. >> > > How would: > > @attr(foo) int x; > int y; > > work? Are x and y the same type or not? Yes they are the same type. > Now, consider: > > auto c = b ? x : y; > c was not attributed, and has no attributes. @blah auto c = b ? x : y; // NOW 'c' is attributed with 'blah', as useless as that is :) Attributes are on the declaration, and not passed around.