[webkit-dev] on coding-style
Darin Adler
darin at apple.com
Fri Apr 12 16:54:34 PDT 2013
On Apr 12, 2013, at 3:33 PM, Karen Shaeffer <shaeffer at neuralscape.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130412/de873fb1/attachment.html>
More information about the webkit-dev
mailing list