News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.