On 4/3/2014 6:14 PM, Meta wrote:
A more interesting point of his is the limitation of Scala's ability to optimize
functions like filter... This is also a problem in D, but not as visible as we
do not have macros to perform the sort of transformation he describes (turning
filter f1, filter f2, filter f3 into filter f1 f2 f3). Maybe we should think
about enforcing that lambas passed to higher order functions are pure, when we
can (not in the compiler, of course. In the library.)

Since in D you can detect if a function is pure, and specialize accordingly, it is not necessary to require that the filter function be pure.

Reply via email to