On Apr 12, 2013, at 3:33 PM, Karen Shaeffer <[email protected]> wrote:

> Shouldn't the coding-style documentation be updated to use nullptr?

We may want to update the guidelines to tell people to use nullptr where it 
works. We definitely put some effort into making it usable in certain contexts; 
we originally added it because we preferred this:

    x = nullptr;

over this:

    x.clear();

for our smart pointer types such as OwnPtr. The tricky part is being clear in 
the coding guidelines about where it’s OK to use nullptr; if we used it 
everywhere we had a 0 for a pointer today, we would run into compiler 
portability problems.

If someone figures out how to be clear on that point, where it should and 
should not be used, we should indeed update the coding style and the coding 
style document.

-- Darin
_______________________________________________
webkit-dev mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to