<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 10, 2021 at 9:17 AM Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
> On 10. Sep 2021, at 17:41, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> wrote:<br>
> <br>
> Hi Tobias --<br>
> <br>
> > Please don't deprecate stuff unnecessarily :)<br>
> <br>
> Why do you think that #strictlyPositive is necessary?<br>
<br>
Practically, it avoids parenthesis.<br>
But it also allows an "abstract" thinking.<br>
You can talk about a property of a thing without the need of a comparison.<br>
<br>
"As long as we have a strictly positive balance, this project can continue"<br>
vs<br>
"As long as we have a balance that is greater than zero, this project can continue"<br>
<br>
Here it's an attribute of the balance and not a relation to a number…<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">+1</div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
> Well, we can at least leave it as a convenience method. I was just curious why we would not want to use it in SmallInteger. I suspected performance ...<br>
<br>
True…<br>
<br>
Best regards<br>
        -Tobias<br>
<br>
> <br>
> Best,<br>
> Marcel<br>
>> Am 10.09.2021 17:11:12 schrieb Tobias Pape <<a href="mailto:das.linux@gmx.de" target="_blank">das.linux@gmx.de</a>>:<br>
>> <br>
>> <br>
>> <br>
>> > On 10. Sep 2021, at 16:05, Marcel Taeumel wrote:<br>
>> > <br>
>> > Hi Levente --<br>
>> > <br>
>> > > removed Integer >> #isPowerOfTwo because it was not used: all subclasses implement that method<br>
>> > <br>
>> > Hmm... what about removing the one in SmallInteger instead bc. its implementation is not that special. #strictlyPositive might be deprecated as well, looking at its 4 senders. Maybe just replace those few integer uses with "> 0" instead. <br>
>> > <br>
>> I like strictlyPositive. Not just because it's a unary message.<br>
>> Please don't deprecate stuff unnecessarily :)<br>
>> <br>
>> Best regards<br>
>> -Tobias<br>
>> <br>
>> > Best,<br>
>> > Marcel<br>
>> >> Am 10.09.2021 15:56:05 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> :<br>
>> >> <br>
>> >> Levente Uzonyi uploaded a new version of Kernel to project The Inbox:<br>
>> >> <a href="http://source.squeak.org/inbox/Kernel-ul.1411.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Kernel-ul.1411.mcz</a><br>
>> >> <br>
>> >> ==================== Summary ====================<br>
>> >> <br>
>> >> Name: Kernel-ul.1411<br>
>> >> Author: ul<br>
>> >> Time: 10 September 2021, 3:16:23.23175 pm<br>
>> >> UUID: 9d7f74f9-52b9-4a1c-babf-60de439244bb<br>
>> >> Ancestors: Kernel-ul.1409<br>
>> >> <br>
>> >> - let all Numbers respond to #isPowerOfTwo.<br>
>> >> - removed Integer >> #isPowerOfTwo because it was not used: all subclasses implement that method<br>
>> >> <br>
>> >> =============== Diff against Kernel-ul.1409 ===============<br>
>> >> <br>
>> >> Item was added:<br>
>> >> + ----- Method: Fraction>>isPowerOfTwo (in category 'testing') -----<br>
>> >> + isPowerOfTwo<br>
>> >> + "Return true if the receiver is an integral power of two."<br>
>> >> + <br>
>> >> + ^numerator = 1 and: [ denominator isPowerOfTwo ]!<br>
>> >> <br>
>> >> Item was removed:<br>
>> >> - ----- Method: Integer>>isPowerOfTwo (in category 'testing') -----<br>
>> >> - isPowerOfTwo<br>
>> >> - "Return true if the receiver is an integral power of two."<br>
>> >> - <br>
>> >> - ^self strictlyPositive and: [ (self bitAnd: self - 1) = 0 ]!<br>
>> >> <br>
>> >> Item was added:<br>
>> >> + ----- Method: Number>>isPowerOfTwo (in category 'testing') -----<br>
>> >> + isPowerOfTwo<br>
>> >> + "Return true if the receiver is an integral power of two."<br>
>> >> + <br>
>> >> + self subclassResponsibility!<br>
>> >> <br>
>> >> Item was added:<br>
>> >> + ----- Method: ScaledDecimal>>isPowerOfTwo (in category 'testing') -----<br>
>> >> + isPowerOfTwo<br>
>> >> + "Return true if the receiver is an integral power of two."<br>
>> >> + <br>
>> >> + ^fraction isPowerOfTwo!<br>
>> >> <br>
>> >> <br>
>> > <br>
>> <br>
>> <br>
>> <br>
> <br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>