2009/7/9 John M McIntosh <johnmci@smalltalkconsulting.com>:
On 9-Jul-09, at 5:58 AM, Hernan Wilkinson wrote:
So, Stef, what do we do? :-) I think we have discussed very interesting things is this thread. My conclusions are:
4) Go back to how things were
+1
Frankly I think you could reuse '==' for the *exact* compare between two items in the Number hierarchy and leave '=' Â as the yes they are *equal* but not the same....
then you could really rummage about and fix/explain/justify why
29347921734912734927349279273499274 == (29347921734912734927349279273499274-1+1) Â is false and explain why in the same manner as saying (1/10) == 0.1 is false, & resolve why 0.1 == (0.1-0.01+0.01) is false yet 10 == (10-1+1) Â is true.
The reason why I would stick to = meaning exactly and some other symbol meaning approximately, is because I expect = to be transitive, while I can very well understand that approximatelyEqual: is not. I would also avoid == because some IdentitySet and the like would start to hate Numbers... unfortunately ~= means different... =~= or using some unicode symbol... (latex \approx)
And yes people do things like use '==' for numbers, for the strangest reasons.
Yes, most because one thought it would be faster (?), but not only... An example is the hackish pattern for enumerating objects that would not work anymore :( like http://bugs.squeak.org/view.php?id=2788
-- = = = ======================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Â Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. Â http://www.smalltalkconsulting.com = = = ========================================================================
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project