Re: [webkit-dev] Great function for Cocoa platform, bridge_cast
Just economy. There is no need for two different names. I personally like it this way, and have found it appealing when I used it. I think you should give it a try. We can certainly change the name later if this turns out to significantly improve things. — Darin
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. — Darin
On Wed, Feb 16, 2022 at 6:13 AM Darin Adler <darin@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
participants (2)
-
Darin Adler
-
Ryosuke Niwa