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 very illustrative.

What I mean is that if you're going to assign an action verb like sprayPaint, there should be some reason that it's =not= "color", i.e, that it reflects some other aspect of the process besides changing the color. For example,

car color: #red.

says to me, "the color is red, whatever it was before is no more." We're divorcing the code from physical reality (which is perfectly fine and usual in most cases).

Other action verbs should be indicative of either the logical process we want the client to be aware of or a physical reality that we're modeling_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to