On Oct 4, 2011 5:57 PM, "Darin Adler" <[email protected]> wrote:
> > I personally find pointers for out parameters to be appropriate in many
situations. It makes the side effects of manipulating the parameter more
obvious, and it provides a clear way for the caller to indicate that they
don't care about a certain out parameter. It sounds like you have reasons to
prefer the opposite behavior.
>
> For an optional out parameter, our style has been to use a pointer. For a
non-optional, our style has been to use a reference.

In addition, I normally prefer to have two overloaded inline functions to
wrap the optional argunents in such cases to avoid callers from using raw
pointers.

> There are hundreds of these in WebCore and JavaScriptCore. It’s largely an
arbitrary guideline, but one that has been around for years and I’d prefer
not to change style unless there is a strong reason.

Right. That's the motivation behind my proposal.

- Ryosuke
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to