Self function

Denis Koroskin 2korden at gmail.com
Mon May 4 16:05:49 PDT 2009


On Tue, 05 May 2009 02:30:49 +0400, bearophile <bearophileHUGS at lycos.com> wrote:

> Denis Koroskin:
>> It was proposed awhile ago:  
>> http://www.digitalmars.com/d/archives/digitalmars/D/FUNCTION_84985.html
>
> I am not asking for a static __function__ name, because you can't use it  
> inside lambdas or function pointers/delegates. The __func I am talking  
> about is a pointer/delegate, and I don't know if you can use a static  
> solution once you start juggling function pointers around.
>
> Bye,
> bearophile

If you read carefully, you'll see that there's more than just __FUNCTION__. For example, I suggested to use some literal to denote current function, fthis/self/whatever. Others suggested scope.function/scope.class/etc. Andrei agreed that there should be a compile-time reflection that would allow function to call itself in some generic way.




More information about the Digitalmars-d mailing list