[webkit-dev] converting by constructor

Adam Barth abarth at webkit.org
Mon May 17 14:52:14 PDT 2010


My understanding is that we almost always use the explicit keyword
unless we "explicitly" want implicit construction.  For example,
AtomicString has a non-explicit constructor that takes a String on
purpose (or at least controlled by NO_IMPLICIT_ATOMICSTRING).

Adam


On Mon, May 17, 2010 at 12:39 PM, Chris Jerdonek <cjerdonek at webkit.org> wrote:
> Hi, I have a basic question.  What has been WebKit's stance on the use of the
> explicit keyword (for higher-level objects in particular)?  Do we prefer the
> looser API's that conversion by constructor affords, or do we more often
> discourage relying on conversion by constructor?
>
> For comparison, the Google C++ style guide says the explicit keyword should
> almost always be used.  Note that I'm not suggesting that this be added to
> our style guide.
>
> Thanks,
> --Chris
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>


More information about the webkit-dev mailing list