The future of UDAs.

deadalnix deadalnix at gmail.com
Thu Nov 29 10:33:48 PST 2012


On Thursday, 29 November 2012 at 16:51:31 UTC, Iain Buclaw wrote:
> 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)

Cowabunga ! String as attribute again.


More information about the Digitalmars-d mailing list