foobar wrote: ... > > I wasn't referring to the above which still deals with the syntactic > issue. I'm talking about making: > > sort!"a >b"(whatever); > and > sort(whatever, (a, b) { return a>b; }); > > have the same performance. Thus obviating the need for the first form. > the best form IMO would be of course: > > whatever.sort((a, b) { return a>b; }); >
Would be nice, but: - is it even possible (performance-wise)? - can you enforce this performance constraint? There is a big difference between inlining a lexical closure and creating a full one on the heap. - with template alias parameters, its easy to compose more complex types at compile time, you will lose this ability.