On Tuesday, 5 August 2014 at 23:25:40 UTC, Artur Skawina via Digitalmars-d wrote:
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

In the second version, the value `1 + 2 * 3` and the name `x` are far away from each other, on the opposite sides of the big expression. This makes it harder to see the connection between them.

Reply via email to