"= 0" instead of "= nullptr"?

Hi Jules,

I spotted something out of the ordinary in the FileChooser header file: you are defaulting pointer-based parameters to 0, instead of nullptr! :shock:

http://channel9.msdn.com/shows/Going+Deep/Stephan-T-Lavavej-Everything-you-ever-wanted-to-know-about-nullptr/

As you can see by the interview… The compiler will honor both. (As I update my older code though I have been using nullptr)

Rail

Indeed, I’ve aware of that :smiley: Just pointing it’s out of the ordinary for the library. (See the coding standard)

Aah… I over-reacted to the :shock:

Cheers,

Rail

Ah, thanks for spotting that!

Hey Jules,

Somewhat related to the post’s title, I noticed that there’s some documentation that says @returns [something], or 0 […]” for methods that return a pointer… For clarity, would it be better to say @returns [something], or null […]” (or nullptr… there seems to be a mixture of both null and nullptr in documentation of other functions/methods/classes)?

Examples:

File::createInputStream();

File::createOutputStream();

There are a bunch more… find-replace “or 0” with ‘whatever’ would probably do it.

Ah, you’re clearly as pedantic as I am! Thanks!

The more I code, the more I think I’m suffering from some code-only form of O.C.D.!

Yep. And it only gets worse, in my experience!

BTW, have Jules ever been interviewed? Is there any testimony of it on internet?

Check out this reddit article

Was hoping to find a tedTalk of Jules, or something on programming or C++; I guess I was hoping for too much :smiley: