The Inbox: Collections-cmm.826.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Collections-cmm.826.mcz

commits-2
Chris Muller uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-cmm.826.mcz

==================== Summary ====================

Name: Collections-cmm.826
Author: cmm
Time: 15 April 2019, 8:08:23.890925 pm
UUID: ad291896-9fa1-4fa1-b587-658cd87d888a
Ancestors: Collections-fn.825

Restrict automatic type coercions in numerical operations to the domain of numbers only; Float, Integer, Fraction and ScaledDecimal.  For objects outside the numerical domain such as Strings, Characters, Points, and other objects, it's desirable to require explicit coercion.

=============== Diff against Collections-fn.825 ===============

Item was removed:
- ----- Method: Character>>adaptToNumber:andSend: (in category 'converting') -----
- adaptToNumber: rcvr andSend: selector
- "If I am involved in arithmetic with a number, convert me to an integer."
-
- ^ rcvr perform: selector with: self asInteger!

Item was removed:
- ----- Method: String>>adaptToNumber:andSend: (in category 'converting') -----
- adaptToNumber: rcvr andSend: selector
- "If I am involved in arithmetic with a number, convert me to a number."
-
- ^ rcvr perform: selector with: self asNumber!

Item was removed:
- ----- Method: String>>adaptToPoint:andSend: (in category 'converting') -----
- adaptToPoint: rcvr andSend: selector
- "If I am involved in arithmetic with a point, convert me to a number."
-
- ^ rcvr perform: selector with: self asNumber!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Collections-cmm.826.mcz

fniephaus
On Tue, Apr 16, 2019 at 3:08 AM <[hidden email]> wrote:
Chris Muller uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-cmm.826.mcz

==================== Summary ====================

Name: Collections-cmm.826
Author: cmm
Time: 15 April 2019, 8:08:23.890925 pm
UUID: ad291896-9fa1-4fa1-b587-658cd87d888a
Ancestors: Collections-fn.825

Restrict automatic type coercions in numerical operations to the domain of numbers only; Float, Integer, Fraction and ScaledDecimal.  For objects outside the numerical domain such as Strings, Characters, Points, and other objects, it's desirable to require explicit coercion.

=============== Diff against Collections-fn.825 ===============

Item was removed:
- ----- Method: Character>>adaptToNumber:andSend: (in category 'converting') -----
- adaptToNumber: rcvr andSend: selector
-       "If I am involved in arithmetic with a number, convert me to an integer."
-
-       ^ rcvr perform: selector with: self asInteger!

Item was removed:
- ----- Method: String>>adaptToNumber:andSend: (in category 'converting') -----
- adaptToNumber: rcvr andSend: selector
-       "If I am involved in arithmetic with a number, convert me to a number."
-
-       ^ rcvr perform: selector with: self asNumber!

Item was removed:
- ----- Method: String>>adaptToPoint:andSend: (in category 'converting') -----
- adaptToPoint: rcvr andSend: selector
-       "If I am involved in arithmetic with a point, convert me to a number."
-
-       ^ rcvr perform: selector with: self asNumber!

+1
I only submitted Collections-fn.825 to make things symmetrical.

Fabio