Future of string lambda functions/string predicate functions

Walter Bright newshound2 at digitalmars.com
Sun Aug 11 11:46:34 PDT 2013


On 8/11/2013 9:26 AM, Andrei Alexandrescu wrote:
> There's a related issue that I think we must solve before deciding whether or
> not we should deprecate string lambdas. Consider:
>
> void main() {
>      import std.range;
>      SortedRange!(int[], "a > b") a;
>      SortedRange!(int[], "a > b") b;
>      b = a;
>      SortedRange!(int[], (a, b) => a > b) c;
>      SortedRange!(int[], (a, b) => a > b) d;
>      d = c;
> }
>
> The last line fails to compile because D does not currently have a good notion
> of comparing lambdas for equality.

Bugzilla?



More information about the Digitalmars-d mailing list