News for hackers. Stuff that matters.
Re:C#: No, you don’t get to use the “as” operator any more by ssp on Friday April 29, 2011 @05:11PM (#2499008)
The problem is that if the code looks like this:

        if (object.some_field != null)  {
               some_unrelated_call();
               object.some_field.foo();
        }
proving that some_unrelated_call() didn't set object.some_field to null is very difficult.
Re:C#: No, you don’t get to use the “as” operator any more by kenjackson on Friday April 29, 2011 @07:00PM (#2499321)
In general, it's also difficult to prove that 'object' doesn't get set to null too.
Re:C#: No, you don’t get to use the “as” operator any more by ssp on Saturday April 30, 2011 @03:04AM (#2500073)
Depends on what you mean by "general", I suppose, but if 'object' is a local variable in a Java-ish language, then there is a fairly straightforward data flow analysis that can do a good conservative estimate.
Re:C#: No, you don’t get to use the “as” operator any more by kenjackson on Saturday April 30, 2011 @11:57AM (#2500860)
but if 'object' is a local variable in a Java-ish language, then there is a fairly straightforward data flow analysis that can do a good

But if it's not, and/or if it can be adress taken...