<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 3:09 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2015-Mar-23, at 15:00, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
> void replaceFunction(Function *F) {<br>
> - if (auto *N = getRaw())<br>
> + if (auto *N = get())<br>
><br>
> Can we just write that as "auto *N = *this" (not sure if that's better - but I'm wondering how much we need the 'get()' function?)?<br>
<br>
</span>I don't mind too much either way, but I find `get()` to be a little<br>
clearer than `*this`. I feel stronger in other spots, where<br>
`get()->` would be changed to `(*this)->`. It's a little too easy<br>
to misread that, IMO.</blockquote><div><br>Is that misreading even likely to be ambiguous/misleading?<br><br>My thought process here is that if I had a local variable of this type:<br><br> DIFoo f;<br><br>I would write:<br><br> if (auto *N = f);<br><br>or <br><br> f->x<br><br>I wouldn't use 'get' - so I tend to not use it when implementing the class (or otherwise dealing with pointers) either.<br><br>But no worries - just a thought. Totally up to you.<br><br>- David<br> </div></div><br></div></div>