[webkit-dev] Naming preference: SetForScope vs. TemporaryChange

JF Bastien jfb at chromium.org
Thu Dec 22 18:32:19 PST 2016


"Scope" seems to capture the C++ nature better.

"Temporary" isn't clear on how long it'll last IMO.


On Thu, Dec 22, 2016 at 6:28 PM Saam barati <sbarati at apple.com> wrote:

> Hi all,
>
> Recently, Yusuke found that JSC and WTF both had the exact same RAII
> helper data structure. JSC called it SetForScope, and WTF called it
> TemporaryChange. (Details here:
> https://bugs.webkit.org/show_bug.cgi?id=164761). Yusuke went to replace
> JSC’s use of SetForScope with TemporaryChange. When I reviewed his patch, I
> suggested to him to rename the class to SetForScope because it was my
> personal preference of the two names. However, I should have first
> discussed this change with other WebKit developers (so I’m doing that now,
> retroactively).
>
> If there is a strong preference to use the name TemporaryChange instead of
> SetForScope, I’ll rename the class back to its original name.
>
> My personal preference is still for the name SetForScope, but my feelings
> are not strongly tied to one name or the other.
>
> - Saam
> _______________________________________________
>
> webkit-dev mailing list
>
> webkit-dev at lists.webkit.org
>
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20161223/1a3c9f81/attachment.html>


More information about the webkit-dev mailing list