equivariant functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 14 12:45:32 PDT 2008


Simen Kjaeraas wrote:
> I don't really see this as a problem. Returning mutable or invariant 
> would be worse. Anyways, if you need the two arguments to be of the same 
> type, I'd prefer this syntax:
> 
>   inout min(inout(A) a1, typeof(a1) a2){}

IMHO we could simplify by discounting min. The major need is to pass the 
type of one argument only. Min and max are templates anyway, and for 
templates we have other ways to make things work.

Andrei




More information about the Digitalmars-d mailing list