[webkit-dev] Guideline for nullptr

Ryosuke Niwa rniwa at webkit.org
Mon Jan 6 13:16:05 PST 2014


Sounds like a great idea to me.

- R. Niwa


On Mon, Jan 6, 2014 at 12:04 PM, Anders Carlsson <andersca at apple.com> wrote:

>
> On Jan 6, 2014, at 12:01 PM, Dan Bernstein <mitz at apple.com> wrote:
>
> >
> >
> > Sent from my iPad
> >
> >> On Jan 6, 2014, at 11:55 AM, Darin Adler <darin at apple.com> wrote:
> >>
> >> I suggest we use nullptr, rather than of 0 or NULL, for all pointer
> nulls in WebKit C++ sources. I don’t see any advantage to using 0 or NULL
> over nullptr, and nullptr has multiple advantages. Three obvious ones:
> Compile time error if accidentally passed to something expecting an
> integer, can be distinguished from an integer in function overloading, can
> tell it’s a pointer.
> >>
> >> Any objections?
>
> I think this is a great idea and something I’ve been doing ever since
> nullptr became available to us.
>
> >>
> >> — Darin
> >>
> >> PS: Maybe even instead of nil in WebKit Objective-C++ code?
> >
> > In Objective-C++, nil is nullptr, so I suggest that we stick with the
> language convention of writing it as nil.
>
> I agree. (Also, using Nil for null classes).
>
> - Anders
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140106/1849e969/attachment.html>


More information about the webkit-dev mailing list