On 20 April 2012 17:19, Jacob Carlborg <doob@me.com> wrote:
On 2012-04-20 14:07, Manu wrote:

There is a secondary problem with my workaround though... I can't figure
any way to *alias* a function argument, I can only get a typetuple of
the arguments. Since I don't have _alias_es of the function args, I have
no way to access their 'identifier'(/name), and that leads to a problem
where I'm generating the public stub function, and I have nothing to
name the args other than a0, a1, a2, etc...
That is complete rubbish, and unusable to an end user by my measure;
intellisense is useless if the pop-up argument list says a0,a1,a2. >_<

Don't know if it helps but you can get the name of the arguments of a function:

https://github.com/jacob-carlborg/orange/blob/master/orange/util/Reflection.d#L29

Amazing, that needs to go in std.traits pronto! :P
This should help with my hack in the mean time.


I don't think that function handles delegate/function parameters.

Bummer. I still think there's room for a formal trait to do this. Complimentary to allMembers and getMember, but for a functions.