<div dir="ltr">The short answer is that you are exposing the internals of the object. If you have an object that is just a packet of values, great. If you have an object that will always have e.g. a colour, then possibly great, or possibly not depending on the domain.<br>
<br><div class="gmail_quote">On Sat, Sep 27, 2008 at 7:40 PM, Andy Burnett <span dir="ltr">&lt;<a href="mailto:andy.burnett@knowinnovation.com">andy.burnett@knowinnovation.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">I read somewhere - can&#39;t remember where - that setters are considered evil. The argument was that in the real world you can&#39;t suddenly change the colour of a car, just by settings its colour value. Instead, you have to perform some action, e.g. sprayPaintCar: aColour.&nbsp; Therefore in the OO world, one should tackle problems in the same way, i.e. if you want to change the value of an instance variable, you have to call some sort of action method, that makes sense in the context of the object.<br>

<br>Without wishing to send&nbsp; startHolyWar to BeginnersList, do any of the experienced developers work this way, or is it just a theoretical position?<br><br>cheers<br>AB<br></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>