<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 21 April 2018 at 03:51, Hilaire <span dir="ltr"><<a href="mailto:hilaire@drgeo.eu" target="_blank">hilaire@drgeo.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Out of curiosity.<br>
<br>
I always found the #min:max: confusing and lost in its expressiveness.<br>
<br>
One should write:<br>
<br>
    10 min: 48 max: 12<br>
<br>
to expect 12.<br>
<br>
but logically one (at least me) may want to express it as:<br>
<br>
    10 min: 12 max: 48<br>
<br>
Then when reading its source code, it is even more confusing:<br>
<br>
min: aMin max: aMax<br>
    ^ (self min: aMin) max: aMax<br>
<br>
Are not the argument names inversed in their meaning, if any?</blockquote><div><br></div><div>I would agree.  I see most use by Color like...</div><div> <br></div></div></div><div class="gmail_extra"><div class="gmail_extra">    Color>>adjustBrightness: brightness</div><div class="gmail_extra">        "Adjust the relative brightness of this color. (lowest value is 0.005 so that hue information is not lost)"</div><div class="gmail_extra"><br></div><div class="gmail_extra">        ^ self class</div><div class="gmail_extra">                h: self hue</div><div class="gmail_extra">                s: self saturation</div><div class="gmail_extra">                v: (self brightness + brightness min: 1.0 max: 0.005)</div><div class="gmail_extra">                alpha: self alpha</div><div class="gmail_extra"><br></div><div class="gmail_extra">

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Trying to read that twists my brain.  <br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I can understand the intent from the implementation </div><div class="gmail_extra"><div class="gmail_extra">min: aMin max: aMax </div><div class="gmail_extra"><span style="white-space:pre">        </span>^ (self min: aMin) max: aMax</div><div class="gmail_extra"><br></div><div class="gmail_extra">but that message might more properly be  #min:thenMax:</div><div class="gmail_extra">However something like    <br></div><div class="gmail_extra">    (<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">self brightness + brightness</span> <span style="font-size:12.8px">boundedBy: 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">0.005</span> and: 1.0)</span></div><div class="gmail_extra"><span style="font-size:12.8px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">    (</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">self brightness + brightness</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:12.8px">boundedMin:<span> </span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">0.005</span> max: 1.0)</span>

<br></span></div><div class="gmail_extra"><span style="font-size:12.8px">seems more intention revealing.</span></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Altering  #min:max  semantics would make awful portability,</div><div class="gmail_extra">but perhaps it should forward to a new method to make it clear the other is preferred.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Would the Squeak community be amenable to a similar change?</div><div class="gmail_extra">I'd be happy to contribute the changes to the Squeak Inbox.</div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers -ben</div><div class="gmail_extra"></div></div></div>