> On Dec 26, 2016, at 9:04 AM, Saam Barati wrote:
>
> Right. I see what you're saying. The name doesn't confuse me with respect to
> these semantics but I see that's it's subtly wrong.
>
> The use case I was thinking of is this:
> `
> class Foo {
>Foo() :
Right. I see what you're saying. The name doesn't confuse me with respect to
these semantics but I see that's it's subtly wrong.
The use case I was thinking of is this:
`
class Foo {
Foo() : m_change(someIntVariable, 20) { }
...
...
ScopedChange m_change;
};
`
Which is
On Mon, Dec 26, 2016 at 5:29 AM, Maciej Stachowiak wrote:
>
> ScopedChange(tachyonFlux, 2.0);
>
I wish there was a compiler warning against this. I have caused at least
one bug by doing this exact thing.
(a temporary gets deleted at the end of the expression)
antti
> On Dec 25, 2016, at 11:35 AM, Saam Barati wrote:
>
> I like ScopedChange the most out of all the names. It's a bit unfortunate
> that such a name doesn't work well in the context of having a ScopedChange as
> a member variable. I think TemporaryChange works much better as
I like ScopedChange the most out of all the names. It's a bit unfortunate that
such a name doesn't work well in the context of having a ScopedChange as a
member variable. I think TemporaryChange works much better as a name if the use
is as a member variable.
My hunch would be the most frequent
A few more coats of paint for the bike shed:
It's a little unusual to have a class name that's a verb phrase instead of a
noun phrase. And in this case if you interpret "Set" as a noun you'll get
entirely the wrong idea. Some alternatives that avoid this, but has the better
clarity of "Scope"
On Fri, 2016-12-23 at 05:42 +, Yusuke SUZUKI wrote:
> Personally I like the name "SetForScope" since the name "scope"
> states that this value change is tied to C++ scope.
Me too. The name is pretty clear. The first time I saw TemporaryChange
I had to look at the implementation to see what it
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 wrote:
> "Scope" seems to capture the C++ nature better.
>
> "Temporary" isn't clear on how long it'll last IMO.
>
>
>
"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 wrote:
> Hi all,
>
> Recently, Yusuke found that JSC and WTF both had the exact same RAII
> helper data structure. JSC called it
9 matches
Mail list logo