> On Sep 6, 2016, at 4:48 PM, Maciej Stachowiak <m...@apple.com> wrote: > > STL smart pointers have a 0-argument reset for non-returning remove instead, > and convention seems to be to use swap() or move() for the returning remove > on a smart pointer. So an alternate possibility would be to use the above > convention for collections, but make smart pointers have no remove+get > operation at all.
Our modern smart pointers follow the standard library convention you mention above. It’s the peculiar cases that need names, such as: “assert this RefPtr is non-null to turn it into a Ref&&”, currently named releaseNonNull “release the RefPtr inside the String”, currently named releaseImpl(), but another possibility would be to have impl() be RefPtr<StringImpl>& instead of a StringImpl*, so you could do move(string.impl()) instead of string.releaseImpl(). — Darin _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev