On 08-01-12 01:09, Johan Engelen wrote:
...
Of course the int should be initialized with '0', but pointers should be with 'NULL'. The code was wrong indeed, and was fixed. But it created some other 'wrongness' that heavily annoyed me. (and because I remembered some talk about 0 vs. NULL before, I decided to kill it now so it doesn't spread) Fixed in r10859.
Instead of using NULL, we might want to start using nullptr. This will be supported by future compilers (apparently GCC 4.6 already supports it), and a work around can be used right now, as described in the proposal: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
The main advantage of nullptr compared to NULL is that it is more type-safe. Also, if anything it is even more descriptive than NULL.