between and among: worth Phobosization?
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Mon Dec 16 13:41:19 PST 2013
On Monday, 16 December 2013 at 21:13:58 UTC, bearophile wrote:
> It also helps in the D translation of Python expressions like:
>
> if foo() and 3 < bar(x) < 5 and ...:
Not really, it uses "<=" which illustrates why it is better to
use lambdas where a named function hides what goes on and there
are several interpretations.
Besides, in many algos you want "low <= x < hi" or the opposite
to avoid double-hits on edge-cases.
More information about the Digitalmars-d
mailing list