www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - alias foo = __traits(...)

reply Shammah Chancellor <email domain.com> writes:
Is this fixed now?  I don't want to denigrate the work to get C++ 
compatibility and the GC improvements.  But, this is the biggest hurdle 
I have when introducing new people into D.   I'm a huge compile time 
reflection proponent, and having alias hack(T...) = T makes the code 
look very buggy to newcomers.

Please don't say "where is the PR?"  When I have time,  I will fix it.  
The learning curve on the frontend is non-trivial and I'm not a 
talented C++ dev.   I will definitely dig in and get at that bug, as 
it's my biggest nit at the moment.

-S.
Nov 05 2014
next sibling parent "safety0ff" <safety0ff.dev gmail.com> writes:
On Thursday, 6 November 2014 at 01:31:40 UTC, Shammah Chancellor 
wrote:
 Is this fixed now?
https://issues.dlang.org/show_bug.cgi?id=7804
Nov 05 2014
prev sibling parent Nick Treleaven <ntrel-pub mybtinternet.com> writes:
On 06/11/2014 01:36, Shammah Chancellor wrote:
 Is this fixed now?
How about: alias compiles(alias expr) = __traits(compiles, expr); I guess supporting that may be problematic (it's too liberal), so I think we should have __compiles(expr) instead. It looks like a small saving, but in complex template code I'm sure it would be appreciated. I think all the other traits could be wrapped normally if $SUBJECT is implemented, but __traits(compiles, ...) is special.
Nov 06 2014