March 12, 2009
Reply to Christopher,


> Eigentemplate.
> 

Doh! :)


March 13, 2009
On Thu, Mar 12, 2009 at 5:05 PM, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
> On Thu, 12 Mar 2009 16:37:06 -0400, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:
>
>> On Thu, Mar 12, 2009 at 4:20 PM, Steven Schveighoffer <schveiguy@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.
March 13, 2009
On Fri, 13 Mar 2009 03:24:10 +0300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:

> On Thu, Mar 12, 2009 at 5:05 PM, Steven Schveighoffer
> <schveiguy@yahoo.com> wrote:
>> On Thu, 12 Mar 2009 16:37:06 -0400, Jarrett Billingsley
>> <jarrett.billingsley@gmail.com> wrote:
>>
>>> On Thu, Mar 12, 2009 at 4:20 PM, Steven Schveighoffer
>>> <schveiguy@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@invisibleduck.org> wrote:
>
> Oh, and should this actually be:
>
> template Blah(Stuff)
> {
>      alias ... this;
> }
>
> I thought that was the new syntax.
>
March 13, 2009
Denis Koroskin escribió:
> On Fri, 13 Mar 2009 03:24:10 +0300, Jarrett Billingsley <jarrett.billingsley@gmail.com> wrote:
> 
>> On Thu, Mar 12, 2009 at 5:05 PM, Steven Schveighoffer
>> <schveiguy@yahoo.com> wrote:
>>> On Thu, 12 Mar 2009 16:37:06 -0400, Jarrett Billingsley
>>> <jarrett.billingsley@gmail.com> wrote:
>>>
>>>> On Thu, Mar 12, 2009 at 4:20 PM, Steven Schveighoffer
>>>> <schveiguy@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@invisibleduck.org> wrote:
>>
>> Oh, and should this actually be:
>>
>> template Blah(Stuff)
>> {
>>      alias ... this;
>> }
>>
>> I thought that was the new syntax.
>>

But maybe "this" gets confused with "this class' instance" (just the meaning, I think there's no ambiguity in the semantic pass). What about:

alias T template;

?
March 13, 2009
Sergey Gromov wrote:
> Thu, 12 Mar 2009 06:33:34 -0700, Andrei Alexandrescu wrote:
> 
>> Hello,
>>
>> I'm looking for a catchy phrase denoting this D idiom:
>>
>> template Blah(Stuff)
>> {
>>     alias ... Blah;
>> }
>>
>> i.e., defining inside a template a symbol of the same name as the template itself. Then you can use Blah!(X, Y) to mean Blah!(X, Y).Blah.
>>
>> What would be a catchy, descriptive, and memorable phrase for this?
>>
>> Thanks,
>>
>> Andrei
> 
> maybe parametrized alias

That sounds good but (I'm saying this to all others who focused on "alias") - the inner name doesn't have to be an alias.

Andrei
March 13, 2009
Christopher Wright wrote:
> Andrei Alexandrescu wrote:
>> Hello,
>>
>>
>> I'm looking for a catchy phrase denoting this D idiom:
>>
>> template Blah(Stuff)
>> {
>>    alias ... Blah;
>> }
>>
>> i.e., defining inside a template a symbol of the same name as the template itself. Then you can use Blah!(X, Y) to mean Blah!(X, Y).Blah.
>>
>> What would be a catchy, descriptive, and memorable phrase for this?
>>
>>
>> Thanks,
>>
>> Andrei
> 
> Eigentemplate.

My heart fell among my other integrated circuits. Looks like a huge winner. Thanks Christopher. Oh boy. I wasn't even dreaming about something *this* good.

Andrei
March 13, 2009
On Thu, Mar 12, 2009 at 6:24 PM, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
> Christopher Wright wrote:
>>
>> Andrei Alexandrescu wrote:
>>>
>>> Hello,
>>>
>>>
>>> I'm looking for a catchy phrase denoting this D idiom:
>>>
>>> template Blah(Stuff)
>>> {
>>>   alias ... Blah;
>>> }
>>>
>>> i.e., defining inside a template a symbol of the same name as the
>>> template itself. Then you can use Blah!(X, Y) to mean Blah!(X, Y).Blah.
>>>
>>> What would be a catchy, descriptive, and memorable phrase for this?
>>>
>>>
>>> Thanks,
>>>
>>> Andrei
>>
>> Eigentemplate.
>
> My heart fell among my other integrated circuits. Looks like a huge winner. Thanks Christopher. Oh boy. I wasn't even dreaming about something *this* good.

Kinda not the same thing if you ask me.  Eigen-blah generally refers to something where you've captured the essence of something better by representing it using a different set of basis functions.

This doesn't seem to have much of anything to do with that.  Its just identity or sameness of name.  That's not really what eigen thingys are about.

But it is what the word "eponymous" is about.

--bb
March 13, 2009
Bill Baxter wrote:
> But it is what the word "eponymous" is about.

I can't even pronounce "eponymous". Not too catchy :-)
March 13, 2009
Hello Bill,

> Kinda not the same thing if you ask me.  Eigen-blah generally refers
> to something where you've captured the essence of something better by
> representing it using a different set of basis functions.
> 
> This doesn't seem to have much of anything to do with that.  Its just
> identity or sameness of name.  That's not really what eigen thingys
> are about.
> 

An Eigen value for a matrix M is a vector V sutch that M x V = V (IIRC)


March 13, 2009
On Fri, Mar 13, 2009 at 1:30 PM, BCS <none@anon.com> wrote:
> Hello Bill,
>
>> Kinda not the same thing if you ask me.  Eigen-blah generally refers to something where you've captured the essence of something better by representing it using a different set of basis functions.
>>
>> This doesn't seem to have much of anything to do with that.  Its just identity or sameness of name.  That's not really what eigen thingys are about.
>>
>
> An Eigen value for a matrix M is a vector V sutch that M x V = V (IIRC)

Close,
If   M v = \lambda  v
Then
\lambda is an eigenvalue (a scalar),
v is the eigenvector (a vector)

--bb