Anonymous function syntax

pillsy pillsbury at gmail.com
Fri Sep 23 08:40:35 PDT 2011


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s
article

> On 09/22/11 16:08, bearophile wrote:

> > Andrei Alexandrescu:

> >> A function literal should be comparable to another for
> >> equality.

> > Are you willing to explain me why, and show an use case?

> An important application is optimizing for specific lambdas (e.g.
> equality). For example, a substring search using equality for
> characters could use bitwise comparison.

Is there some reason this isn't better handled through templating
mechanisms? It seems like this would primarily benefit picking
better optimization strategies at *runtime*, which strikes me as a
fairly esoteric use case.

Cheers,
Pillsy


More information about the Digitalmars-d mailing list