News for hackers. Stuff that matters.
Re:What’s New in C# 7.0 by taspeotis on Wednesday August 24, 2016 @09:44PM (#12356458)
R# should warn "unused variable myvar" on the first one.

You'll get a compiler error if you try and use `I` uninitialized.

Not saying you're wrong, just having trouble getting worried about this. You can make typos now:

    int x, y;
    foo(out x, out x); // oops, not y; was up too late coding
Re:What’s New in C# 7.0 by dleslie on Wednesday August 24, 2016 @09:53PM (#12356498)
In a non-trivial example it's likely that `myvar` or `I` would see themselves used elsewhere, perhaps even as an out value to another method, and so raise no warnings. The source of the problem won't be so obvious at-a-glance because the new declaration syntax aren't so different from existing syntax, and could easily go unnoticed when shadowing existing values deep within a function.

Sure, you can make typos now, but these changes expand the possibilities of errors arising from typos or incomplete refactoring; while reducing the discoverability of the issue at-a-glance.