__FUNCTION__ implemented with mixins and mangles

Nick Sabalausky a at a.a
Sun Jun 14 01:40:50 PDT 2009


>"Jarrett Billingsley" <jarrett.billingsley at gmail.com> wrote in message 
> >news:mailman.262.1244953393.13405.digitalmars-d at puremagic.com...
>On Sat, Jun 13, 2009 at 9:46 PM, zsxxsz<zhengshuxin at hexun.com> wrote:
>> It's good. But I think it should be implement by the DMD compiler, just 
>> like
>> __FILE__ and __LINE__. __FUNCTION__ should be the base D language syntax 
>> same as
>> __FILE__, __LINE__, in C99, they're all the compiler's things to get 
>> these and the
>> compiler do these more easily than any library.
>>
>
>I completely agree, but Walter and Andrei's argument against it is -
>where does it end?  Do we need __PACKAGE__, __MODULE__, __TYPE__,
>__TEMPLATE__, etc. etc. etc.?  And I agree with them too - but you
>know, it'd be nice to actually get some results on these things once
>in a while instead of a bunch of bullshit bikeshed discussions.
>Sheesh.
>

I think a big part of the reasoning was that it would be better to just 
expand reflection to handle those things. But yea, it would be nice to have 
something in the meantime. I suppose it might not be too hard (for someone 
already used to working with the frontend source) to do a preprocessor that 
does that, or a custom patch (like I do for "warnings as warnings" and umm, 
you know, I actually forgot the other patch I'm using...). 





More information about the Digitalmars-d mailing list