Mixin template parameters / mixin template literals

Idan Arye GenericNPC at gmail.com
Fri Apr 26 04:38:14 PDT 2013


On Friday, 26 April 2013 at 08:13:48 UTC, renoX wrote:
> I consider 'sort!("a > b")(array);' to be **too terse**: there 
> is nothing here telling the reader what a and b are supposed to 
> be.

Sure there is - it's called "convention". Since all the functions 
in `std.algorithm` that accept delegates also accept string 
literals for a mixin that use `a` and `b` as the arguments, the 
reader should know what `a` and `b` means, just like they know 
what `sort` means.


More information about the Digitalmars-d mailing list