The future of UDAs.

Iain Buclaw ibuclaw at ubuntu.com
Thu Nov 29 08:51:23 PST 2012


On 27 November 2012 21:42, Walter Bright <newshound2 at digitalmars.com> wrote:
> On 11/27/2012 10:37 PM, Iain Buclaw wrote:
>>
>> 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.
>
>
> That's right. However, you can use CTFE to read those UDAs and generate
> results that are embedded into the object files.
>

I also see that the information is available in the codegen stage too
(toElem) - I suppose this may open a door to implement
compiler-specific UDAs:

["gcc.flatten"]
int foobar()
{
}


Or maybe not.... :o)

-- 
Iain Buclaw

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


More information about the Digitalmars-d mailing list