[webkit-dev] on coding-style
rniwa at webkit.org
Fri Apr 12 16:24:04 PDT 2013
On Fri, Apr 12, 2013 at 4:09 PM, Karen Shaeffer <shaeffer at neuralscape.com>wrote:
> On Fri, Apr 12, 2013 at 03:41:17PM -0700, Benjamin Poulain wrote:
> > On Fri, Apr 12, 2013 at 3:33 PM, Karen Shaeffer <
> shaeffer at neuralscape.com>wrote:
> > >
> > > Was reading the coding-style documentation. Have just one question
> > > concerning
> > > C++ null pointer value. Quoting the coding-style docs, "In C++, the
> > > pointer
> > > value should be written as 0."
> > >
> > > My question is: Doesn't xcode clang now support features like nullptr?
> > > Shouldn't
> > > the coding-style documentation be updated to use nullptr?
> > >
> > The problem is the variety of compilers used by the various ports (WebKit
> > is also used on Windows, Linux, Solaris, etc.), not all of them supports
> > nullptr.
> > You can already use nullptr with some types (RefPtr, OwnPtr, etc). That
> > thanks to a hack in Source/WTF/wtf/NullPtr.h
> > Cheers,
> > Benjamin
> Hi Benjamin,
> Of course, I understand that. But there is a huge opportunity cost to
> The c++11 standard also rewrites the entire standard library. I have been
> g++ 4.7.2 using -stdc++11 in my work with linux. And the code I have
> tested is
> performing nearly like c code. If you take advantage of the performance
> in C++11, then you can realize impressive performance gains.
> I do understand the nature of the business. And I also understand that
> is huge moving forward, where resource constrained mobile platforms are
> affected by performance issues. I suggest you'll see Blink moving
> aggressively to
> support C++11 moving forward. And I suggest it is in WebKit's long term
> interest to
> do so as well.
It certainly is our long term goal but we can't do that today.
C++11 support is not ubiquitous, and portability is one of our project
goals as stated on http://www.webkit.org/projects/goals.html.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev