<div dir="ltr"><div dir="ltr">Ken,<div><br></div><div>I'm not following your thinking here.   What other implementations of things like #darker are you thinking of and how would renaming break encapsulation?</div><div><br></div><div>As an example, let's say we had Form implement #darker which darkened the image and Color where #darker returns a new, darker color.  I'd see that as semantic overloading, not polymorphism.   And in the event we actually wanted the Form implementation to return a new, darkened Form, how would calling it #asDarkerForm break encapsulation?  To me, that's just making it clear that you are not darkening the existing image but rather creating a new one... I still have no idea what's going on inside the object, only what I expect it to do/return.</div><div><br></div><div>Thanks,</div><div>Phil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 28, 2019 at 8:37 PM ken.dickey--- via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2019-04-28 16:45, Phil B via Cuis-dev wrote:<br>
<br>
> That was pretty much the point being made: rename the methods so it's <br>
> clear that they are returning a new color rather than modifying the <br>
> current one.  (i.e. the issue is the naming, not the underlying <br>
> implementation)<br>
<br>
The point here is implementation hiding.<br>
<br>
I want names to be polymorphic.  If method names to care about <br>
mutable/immutable or immediate/vector/composite I lose polymorphism.<br>
<br>
I know how the implementation works.  I would like to be able to change <br>
the implementation and have most code still work.<br>
<br>
The classic example is changing character support from ASCII to Unicode. <br>
(e.g. see package <br>
<a href="https://github.com/Cuis-Smalltalk/EnhancedText/tree/master/Unicode" rel="noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/EnhancedText/tree/master/Unicode</a>).  <br>
There is a whole bunch of implementation magic, but using the text <br>
editor pretty much just works.<br>
<br>
Changing selectors because they had to indicate how things were <br>
implemented would have broken encapsulation and causes a huge amount of <br>
work.<br>
<br>
Breaking encapsulation would be very un-Smalltalk!<br>
<br>
$0.02,<br>
-KenD<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>