Just two remarks from a non native english guy:

1) "digit" is also used with different semantic in #digitLength
#digitAt: #digitAt:put:
and thus a method comment is more than welcome!

2) there is already a SmallInteger>>#decimalDigitLength doing what you want.
However, since SmallInteger>>#numberOfDigitsInBase: is sending
#decimalDigitLength ,
implementing :
    Integer>>#decimalDigitLength
        ^self numberOfDigitsInBase: 10
is possible but a little troubling (inverted send logic in superclass
and subclass).
Also, you'd better not remove SmallInteger>>#decimalDigitLength
because avoiding quo: it is very efficient for most common cases.
So maybe adding a third message numberOfDigits is the best way... I
let you judge by yourself.
(Bad luck, I just come back from Greece, and if you ask an oracle,
answer is rarely yes or no).

Nicolas

2009/4/12 Stéphane Ducasse <[email protected]>:
> may be there is a better solution.. Nicolas??
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to