On Thu, 20 Mar 2014 21:44:38 -0400, bearophile <bearophileh...@lycos.com>
wrote:
Steven Schveighoffer:
This is also a pure function:
pure int foo()
{
while(1) {}
return 0;
}
Pure doesn't mean "bug free".
Thankfully the D compiler catches the bug :-)
test.d(3,4): Warning: statement is not reachable
I can make it not catch that error, but that is not the bug. The bug is
that it never returns, effectively deadlocking. The sample is
intentionally short to demonstrate my point, I (obviously) didn't try to
compile it.
-Steve