New Traits

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Tue May 15 04:23:06 PDT 2012


On Tue, May 15, 2012 at 3:13 AM, John Maschmeyer <jmaschme at gmail.com> wrote:

> I implemented some new traits that seemed to have a lot of
> interest recently.
>
> I've implemented parameterNames, isPublic, isPrivate,
> isProtected, isPackge, isExport, and codeof traits.
>
> parameterNames lets you get access to the names of function
> parameters
>
> isPublic, isPrivate, etc let you query access modifiers
>
> codeof was discussed recently in
> http://forum.dlang.org/thread/**huyqfcoosgzfneswnrur@forum.**dlang.org<http://forum.dlang.org/thread/huyqfcoosgzfneswnrur@forum.dlang.org>
> .
>   It gives you access to the source code of functions, classes,
> etc.
>
> I'm pretty new to the dmd code, so could someone take a look at
> them?
>
> https://github.com/D-**Programming-Language/dmd/pull/**951<https://github.com/D-Programming-Language/dmd/pull/951>
> https://github.com/D-**Programming-Language/dmd/pull/**952<https://github.com/D-Programming-Language/dmd/pull/952>
> https://github.com/D-**Programming-Language/dmd/pull/**953<https://github.com/D-Programming-Language/dmd/pull/953>
>

This is exquisitely awesome! Thank you!
The only question that remains is: How about the fact, that
__traits(getMember, Class, PrivateMember) doesn't compile?
With the new __traits(parameterNames, ...) It's not an issue any more...

-- 
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120515/49cd36f8/attachment.html>


More information about the Digitalmars-d mailing list