catchy phrase for this idiom?

Denis Koroskin 2korden at gmail.com
Thu Mar 12 17:56:57 PDT 2009


On Fri, 13 Mar 2009 03:24:10 +0300, Jarrett Billingsley <jarrett.billingsley at gmail.com> wrote:

> On Thu, Mar 12, 2009 at 5:05 PM, Steven Schveighoffer
> <schveiguy at yahoo.com> wrote:
>> On Thu, 12 Mar 2009 16:37:06 -0400, Jarrett Billingsley
>> <jarrett.billingsley at gmail.com> wrote:
>>
>>> On Thu, Mar 12, 2009 at 4:20 PM, Steven Schveighoffer
>>> <schveiguy at yahoo.com> wrote:
>>>>
>>>> How do you do this without the Template Identity syntax?
>>>> (I'm going to start calling it this to promote the term I thought was
>>>> best
>>>> ;)
>>>
>>> I'm not suggesting it be removed.  I'm suggesting that if you were
>>> only able to put one symbol in the template, it would be completely
>>> unnecessary.  Templates would always resolve to the single symbol that
>>> they declare.
>>
>> So without requiring the alias how do you rewrite my example?  I'm not
>> saying you are wrong, I just don't grasp what you are saying.  An  
>> example
>> would be helpful.
>
> It would go along with the suggestion of having some kind of name for
> the current template.  Something like:
>
> template Blah(T)
> {
>   static if(is(T : int))
>      alias T this template;
>   else
>      alias T* this template;
> }
>
> 'this template' (which reads like English, nicely) would be
> lexicalized as a single token and would only be legal within
> templates.  But this suggestion is somewhat orthogonal.

Sean has proposed (or let out a secret?) that:

On Thu, 12 Mar 2009 18:02:18 +0300, Sean Kelly <sean at invisibleduck.org> wrote:
>
> Oh, and should this actually be:
>
> template Blah(Stuff)
> {
>      alias ... this;
> }
>
> I thought that was the new syntax.
>



More information about the Digitalmars-d mailing list