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

Bye,
bearophile

Reply via email to