reference to 'self' inside a function
Jonathan M Davis
jmdavisProg at gmx.com
Tue Jul 17 17:47:49 PDT 2012
On Wednesday, July 18, 2012 00:03:25 bearophile wrote:
> angel:
> > I propose to introduce a reference to the current function,
> > much like 'this' in a class method. Call it 'self' or
> > 'thisFunc', or whatever ...
>
> Or __func or something. I'm asking for it for years.
You could always use __FUNCTION__ in a string mixin, but that _is_ rather
ugly.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list