Nick Sabalausky wrote:
"Walter Bright" <newshou...@digitalmars.com> wrote in message
For the code:

  void test()
  {
    int i = i + 5;
  }

D reports:

  test.d(4): Error: undefined identifier i

Yes, which by your "people will toss something in to shut the compiler up" reasoning will then cause people to turn that into this "to shut the compiler up":

void test()
{
   int i;
   i = i + 5;
}

Which the D compiler will be perfectly happy with even though it's probably wrong.

I see no reason why people would do that. It doesn't save typing, it isn't convenient, etc.

Reply via email to