On Tue, 28 Oct 2014 01:36:01 +0000
bitwise via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> I have actually found a work around as well, which was to wrap 
> the actual retrieval of the function address in a lambda, and 
> pass the lambda by template parameter instead:
it's not a "workaround", it's almost exactly what i did in my sample,
just not that hairy.

you can't get address of anything in compile time, 'cause there is no
such address. but you can do it in runtime, of course. that's what you
doing: postponing "&" to runtime.

> as far as I could google, no one has attempted this yet.
no one published it yet, not "no one attempted". i desperately need
runtime reflection for my (still private) component builder project, so
i'm slowly writing that mechanics. and my "command console" using
similar technique to allow user inspect variables and classes, and call
function/methods in runtime.

yet the thing is still in post-alpha stage (but it works). i also found
some compiler bugs while writing it, but not yet filled bugreports (i
know, i know, i shouldn't be so lazy).

> My prototype works pretty much as he has described, less a feature 
> here and there.
ah, that's good. i'm not aiming for full reflection mechanics, but i
want to have it. ;-)

Attachment: signature.asc
Description: PGP signature

Reply via email to