Phobos PR: `call` vs. `bindTo`

Artur Skawina via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 5 16:25:27 PDT 2014


On 08/05/14 21:29, H. S. Teoh via Digitalmars-d wrote:
> There are currently two Phobos PR's that implement essentially the same
> functionality, but in slightly different ways:
> 
> 	https://github.com/D-Programming-Language/phobos/pull/1255

How is

   (1 + 2 * 3).bindTo!(x => x * x * x + 2 * x * x + 3 * x)()

better than

   (x => x * x * x + 2 * x * x + 3 * x)(1 + 2 * 3)

?

artur


More information about the Digitalmars-d mailing list