The future of UDAs.

Iain Buclaw ibuclaw at ubuntu.com
Tue Nov 27 03:37:24 PST 2012


On 27 November 2012 11:16, Manu <turkeyman at gmail.com> wrote:
> On 27 November 2012 09:42, Gor Gyolchanyan <gor.f.gyolchanyan at gmail.com>
> wrote:
>>
>> Hi, fellow D programmers.
>>
>> I'd like to know (and I think I'm not alone with this) the future plans
>> about UDAs, the features they're planned to have and the features they're
>> planned not to have.
>> I have a curious project, which would be vastly easier and cleaner with
>> proper UDAs, so naturally I'd like to know what to expect, because if what I
>> need is planned to be available, I'll postpone my project, instead of
>> rushing into an ugly solution.
>>
>> AFAIK, currently UDAs are set at declaration site, are immutable and the
>> declaration cannot get additional UDAs externally.
>
>
> This is true, and variable UDA's would be nice. Attributed variable
> declarations it should be trivial, but I guess the problem is if you
> attribute members of a struct, or any type its self for that matter, then
> each instance of that type would have to have respective UDA instances,
> that's not so simple. Where do they allocate? Are they part of the struct or
> not?
>

As far as I can tell, it's all just metadata known at compile-time
only.  Nothing is written in the resultant binaries or object files
produced.



-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list