On Mon, 2016-09-05 at 10:23 -0700, Filip Pizlo wrote: > The use of "take" for these methods grinds my gears, for the same > reason you were distracted: "take" describes the desires of the > caller, but that doesn't work for me because I read > "fred.makeCoffee()" as "makeCoffee()" being an imperative verb phrase > and "fred" as being the subject that will make me the coffee. So, > "HashMap::take" means to me that the HashMap is taking something from > me, rather than releasing something to me. > > I wonder if there is anyone who is surprised more by release than by > take, and who would find it strange to say > ExceptionOr::releaseReturnValue.
I'm more used to seeing "release" used with smart pointers and "take" used with data structures, but I like your argument that the semantics of "take" are backwards. "Release" is clear in either case. Michael _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev