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

Yusuke SUZUKI utatane.tea at gmail.com
Thu Dec 22 21:42:29 PST 2016


Personally I like the name "SetForScope" since the name "scope" states that
this value change is tied to C++ scope.

On Fri, Dec 23, 2016 at 11:32 JF Bastien <jfb at chromium.org> wrote:

> "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
>
>
>
> _______________________________________________
>
> 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/4fe4bf44/attachment.html>


More information about the webkit-dev mailing list