equivariant functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 14 18:36:29 PDT 2008


Bill Baxter wrote:
> On Wed, Oct 15, 2008 at 6:23 AM, Denis Koroskin <2korden at gmail.com> wrote:
>> On Wed, 15 Oct 2008 01:18:40 +0400, Robert Fraser
>> <fraserofthenight at gmail.com> wrote:
>>
>>> Andrei Alexandrescu wrote:
>>>> Yah, that's where the PassQual template is needed. I'd agree without joy
>>>> that, if handling true equivariance is too unwieldy, we can resign to
>>>> solving only equivariance in qualifier.
>>> FWIW, people have done without type eqivariance w/o complaint since static
>>> typing was invented. People have been complaining about const equivariance
>>> since at least C++ and D makes it worse.
>> People didn't complain that they were nude until someone discovered it :)
>> I mean, human needs grow over time as they discover something useful.
> 
> Agreed.  There are uses for equivariance if you have it.
> I think especially so when thinking about functional style programming
> where you are chaining many functions together.  It's nice if the
> chain you create doesn't lose the input object's true most derived
> identity.  You can fake it with templates if you really have to, but
> then if they are member functions they become non-virtual.


Yah. What's the name of the feature? I was told a couple of times; I 
always forget it.

Andrei



More information about the Digitalmars-d mailing list