Nick Sabalausky wrote:
"dsimcha" <[email protected]> wrote in message news:[email protected]...
== Quote from Jarrett Billingsley ([email protected])'s article
Can we get this please?  It's so simple and would be terribly useful.
Can someone explain what __FUNCTION__ would do in a little more detail? I feel like the two posts of this thread so far are talking in secret __FUNCTION__-dealer
code.

void foofunc()
{
    Stdout.formatln("{}", __FUNCTION__);
}

Output:
foofunc

Ie, basically the same as __FILE__ and __LINE__ and useful in the same ways.

I think instead of __FUNCTION__ we'll define a much more comprehensive static reflection facility.

Also, I'd like to be able to do something like:

Reflect.invoke(__FUNCTION__, params);

Yah... and Variant needs to have something similar as well. We know quite what std.reflect needs to look like, just we want to keep our fingers out of too many pies at once.

Something funtionally equiveilent to that would aid maitenance of self-invoking functions (not only recusion, but also func overloads that are defined in terms of one "primary" overload).

Also would be nice for similar reasons: __CLASS__ (or something similar that would also work for structs)

Yah.

Andrei

Reply via email to