<div dir="ltr">On Fri, Jul 25, 2014 at 3:20 PM, Chris Jones <span dir="ltr"><<a href="mailto:jones.chris.g@gmail.com" target="_blank">jones.chris.g@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Thu, Jul 24, 2014 at 4:32 PM, Robert O'Callahan <span dir="ltr"><<a href="mailto:robert@ocallahan.org" target="_blank">robert@ocallahan.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div class="gmail_extra"><div class="gmail_quote"><div>* I know you like the pattern where a private member foo is accessed via a getter method "foo_type& foo()" but I don't :-).</div>

</div></div></div></div></div></div></blockquote></div><div><br><div dir="ltr">When I want to trigger side effects on setting foo, I <div style="font-family:arial,helvetica,sans-serif;display:inline">​agree with a separate setter, but otherwise I don't like the extra boilerplate (part of that may be Java PTSD) and sometimes like to know that no side effects are involved.<br>
</div></div></div></div></div></div></blockquote><div> </div></div>The problem is that if at some future point you decide that side effects on setting are needed after all, with "foo_type& foo()" you have to change the API and modify client code. It's not better than just exposing the field directly IMHO. I blame the PTSD :-).<br>
</div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">Rob<br></div><div class="gmail_extra">-- <br><div dir="ltr">oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo<br>owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo<br>
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo owohooo<br>osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o oioso<br>oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo owohooo<br>
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro ooofo<br>otohoeo ofoioroeo ooofo ohoeololo.</div>
</div></div>