2007/6/24, Jon Keating <[EMAIL PROTECTED]>:
I don't like using macros unless absolutely necessary. And NULL is a macro, which makes it a hack to C++. I'm pretty sure even Stroustrup has said that he doesn't use NULL.
Yes: http://www.research.att.com/~bs/bs_faq2.html#null Despite the link above, I remember reading somewhere (probably when reading about the new nullptr keyword that will appear in c++0x) that he didn't like it because the following code will print foo, not bar as one might expect. void a(int) { printf("foo\n"); } void a(void*) { printf("bar\n"); } int main() { a(NULL); } But I have yet to see such code and gcc will print a warning when you compile it, so I don't think it's a strong argument. On the other hand, the documentation and readability gains you get by using NULL is well worth it, even if it's a "hack". Anyway, I've updated the wiki with both your comments. If it looks ok to you all, we can move on and start doing some coding :) // Erik -- Erik Johansson http://ejohansson.se/
