On Sat, 27 Sep 2008 20:47:39 -0700, Ralph Johnson [EMAIL PROTECTED]
wrote:
On Sat, Sep 27, 2008 at 1:40 PM, Andy Burnett
[EMAIL PROTECTED] wrote:
I read somewhere - can't remember where - that setters are considered
evil.
This is not a good argument. Many Smalltalk objects are not
On Sun, 28 Sep 2008 13:27:52 -0700, Blake [EMAIL PROTECTED] wrote:
If you're going to assign an action verb to a setter, it should be
reflective of the process.
donut := Donut makePlain.
donut ice: #chocolate.
donut addSprinkles: jimmies atRandom.
Looking at this again, it doesn't seem
On Sunday 28 Sep 2008 12:10:37 am Andy Burnett wrote:
I read somewhere - can't remember where - that setters are considered evil.
The argument was that in the real world you can't suddenly change the
colour of a car, just by settings its colour value. Instead, you have to
perform some action,
I read somewhere - can't remember where - that setters are considered evil.
The argument was that in the real world you can'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. Therefore in the OO world,
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.
On Sat, Sep 27, 2008 at 7:40 PM, Andy
On Sat, Sep 27, 2008 at 1:40 PM, Andy Burnett
[EMAIL PROTECTED] wrote:
I read somewhere - can't remember where - that setters are considered evil.
The argument was that in the real world you can't suddenly change the colour
of a car, just by settings its colour value. Instead, you have to