On Friday, 4 April 2014 at 01:51:58 UTC, Walter Bright wrote:
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.

That's true, but then somebody somewhere accidentally passes in a delegate that references some outside state, and performance is suddenly shot for no apparent reason. The upside in D is that you can explicitly mark delegates as pure and have the compiler check for you, but that still puts the onus on the user to be disciplined and not forget.

Reply via email to