[squeakdev] Daily Commit Log
commits at source.squeak.org
commits at source.squeak.org
Wed Sep 7 23:55:12 UTC 2011
Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:
http://lists.squeakfoundation.org/pipermail/packages/2011September/004945.html
Name: Kernelnice.614
Ancestors: Kernelnice.613
Let (ScaledDecimal newFromNumber: 0.0 scale: 2) print itself.
While at it, review ScaledDecimal comment and indicate that the fraction inst var can be an Integer eventually.
=============================================
http://lists.squeakfoundation.org/pipermail/packages/2011September/004946.html
Name: Kernelnice.615
Ancestors: Kernelnice.614
Integer shall understand #numerator and #denominator to be polymorphic to Fraction.
Integer shall be polymorphic to Fraction because Fraction with denominator = 1 don't preserve their class across arithmetic operations.
=============================================
http://lists.squeakfoundation.org/pipermail/packages/2011September/004947.html
Name: Kernelnice.616
Ancestors: Kernelnice.615
Form a Fraction explicitely rather than sending asFraction when coercing an Integer is required.
This way, Integer>>#isFraction and Integer>>#asFraction can be modified.
=============================================
http://lists.squeakfoundation.org/pipermail/packages/2011September/004948.html
Name: Kernelnice.617
Ancestors: Kernelnice.616
Consider an Integer as a special kind of Fraction (from behavioral POV, not from hierarchical POV), ans as such answer true to #isFraction and answer self to #asFraction.
This is a logical consequence of having Fraction with a unit denominator automatically reduced to Integer.
Two prerequisites to this change are:
 letting Integer be polymorphic with Fraction by responding to #numerator and #denominator
 and don't letting senders of #asFraction rely on the class of the result being a Fraction (which was the case of some coercion message only).
These requirements should be fullfiled by updatenice.196.mcm.
A side effect of this change is to speed up a bit mixed arithmetic like (1/2)+1, but not 1+(1/2).
A second side effect is that (1 at 2) asNonFractionalPoint will now convert coordinates to floating point.
There is no other sender of #isFraction or #asFraction affected by the change in the trunk image.
=============================================
More information about the Squeakdev
mailing list
