<div dir="ltr"><div dir="ltr">On Sun, Apr 28, 2019 at 8:07 PM Juan Vuletich <<a href="mailto:juan@jvuletich.org" target="_blank">juan@jvuletich.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff"><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div>That was pretty much the point being made: rename the
methods so it's clear that they are returning a new color
rather than modifying the current one. (i.e. the issue is
the naming, not the underlying implementation)</div>
</div>
</div>
</blockquote>
<br>
Maybe we could add a 'but' prefix. For example `Color red
butDarker`. Would that sound better?<br>
<br></div></blockquote><div><br></div><div>I think that would be better. (FWIW, my first thought was along the lines of #asDarkerColor which fits with the other #as* methods but doesn't read as nicely) </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
WRT making Color immutable... All methods that change state
are marked <br>
as 'private'. What else do you suggest?<br>
<br>
</blockquote>
<div><br>
</div>
<div>Prefixing the setters with #private<whatever> would
be my preference.</div>
</div>
</div>
</blockquote>
<br>
I see. Yes, that would be nicer. But Color already inherits #at: and
#at:put: which we can not rename. In addition we'd need to change
that all over the system for consistency. If my script was correct,
Cuis includes 180 classes with a 'private' method categories. What
I'd like to have is real immutability.<br><br></div></blockquote><div><br></div><div>I hear you re: some sort of 'real' immutability... in the meantime we do what we can ;-) (I'm used to faking it in languages like Obj-C so it doesn't bug me too much not to have it)</div></div></div>