[webkit-dev] Great function for Cocoa platform, bridge_cast
rniwa at webkit.org
Wed Feb 16 11:27:59 PST 2022
On Wed, Feb 16, 2022 at 6:13 AM Darin Adler <darin at apple.com> wrote:
> I think of it as following the same naming pattern as downcast<> or
> static_cast<>, but you don’t have to specify a template argument since it
> infers it for you.
I guess the closer analogy might be with const_cast, which does the "right
thing" based on the type.
I still think a single name conversion is less clear since we don't
typically call out which type of an object is returned by a function (since
we don't really use Hungarian notation). We'd end up having to look up the
function declaration / definition to see whether it returns CF vs NS/UI.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev