Sean Kelly wrote:
In a language like Java where basically every variable is a reference,
it can be a lot more difficult to figure out where a null came from.
I've never had this problem in code I've written either, but I've had to
maintain some Java code that was nearly impenetrable and this was
absolutely an issue.
I've found that variables are rarely written to, but often read. A grep
finds the handful of places where it is written to (a good IDE should
also provide this information much better than grep). There just won't
be that many places to look.
(I tend to use grep a lot on code, and so tend to write variable names
that are amenable to grep. If you use globals named "i", hope you have a
decent IDE!)
- Re: Null references (oh no, not again!) bearophile
- Re: Null references (oh no, not again!) Denis Koroskin
- Re: Null references (oh no, not again!) Yigal Chripun
- Re: Null references (oh no, not again!) Christopher Wright
- Re: Null references (oh no, not again!) Sean Kelly
- Re: Null references - crash dump on Win The Anh Tran
- Re: Null references (oh no, not again!) Walter Bright
- Re: Null references (oh no, not again!) Andrei Alexandrescu
- Re: Null references (oh no, not again!) Walter Bright
- Re: Null references (oh no, not again!) Sean Kelly
- Re: Null references (oh no, not again!) Walter Bright
- Re: Null references (oh no, not again!) Sean Kelly
- Re: Null references (oh no, not again!) BCS
- Re: Null references (oh no, not again!) Christopher Wright
- Re: Null references (oh no, not again!) Andrei Alexandrescu
- Re: Null references (oh no, not again!) BCS
- Re: Null references (oh no, not again!) Christopher Wright
- Re: Null references (oh no, not again!) BCS
- Re: Null references (oh no, not again!) Christopher Wright
- Re: Null references (oh no, not again!) BCS
- Re: Null references (oh no, not again!) Joel C. Salomon