Nick Sabalausky wrote:
Well I'll be damned, even C/C++ knows that uninitialized variables shouldn't be used, and yet D doesn't. This is where Walter claims that getting rid of that warning improves safety because it prevents people from "shutting the compiler up" by changing this:

int i = i + 5;

Into this code which D happily accepts:

int i;
i = i + 5;


For the code:

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

D reports:

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

Reply via email to