Unification and extension of compile-time reflection

Marcin Kuszczak aarti_please_no at spam_interia.pl
Tue Nov 25 15:08:05 PST 2008


Nick Sabalausky wrote:

> 
> "Jarrett Billingsley" <jarrett.billingsley at gmail.com> wrote in message
>>
>> Ahh, nonono, I proposed keeping is() but only as syntactic sugar for
>> traits() magic.  So under my proposal one would be able to do:
>>
>> static if(is(T : V[K], K, V))
>> {
>>   // V and K are defined here
>> }
>>
> 
> I think his "eliminate is()" proposal was about turning the above into
> something like this:
> 
> static if(T : V[K], K, V)
> 
> instead of eliminating what is() does.

Almost exactly like you said, but also with reverted position of introduced types, so that declaration will be before usage. 

So instead of *current* syntax (in Jarret's example is syntax error):
static if(is(T V : V[K], K))

you could just use:
static if(T V K : V[K])

Looks simpler to me :-)

-- 
Regards
Marcin Kuszczak (Aarti_pl)
-------------------------------------
Ask me why I believe in Jesus - http://www.zapytajmnie.com (en/pl)
Doost (port of few Boost libraries) - http://www.dsource.org/projects/doost/
-------------------------------------




More information about the Digitalmars-d mailing list