Future of string lambda functions/string predicate functions

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Tue Aug 13 22:05:50 PDT 2013


On Wednesday, 14 August 2013 at 02:05:16 UTC, Manu wrote:
> So rather than: func!((a, b) => a < b)(args)
> You use: func!binaryLess(args)
>
> Or something like that?

I don't really like that solution, but I got a little closer:

func!(opBinary!">")(args);

The issue here are:

func!"a.label < b.label"(args);

and unaryFun:

filter!"a > 0"(args);

maybe: filter!(opUnary!">"(0))(args);
Which is problematic: someFun!(opUnary!"++")(args);

I find the string lambda to be perfect for the simple logic, and 
there isn't really a highlighting issue since there usually isn't 
anything to highlight anyway; and we have q{ tokens here }.


More information about the Digitalmars-d mailing list