Hi Stef, I think this one's easy, especially for Pharo. Since apparently it was Etoys, not Morphic, that was or is using the strings and numbers mixed arithmetic, and Pharo does not care about Etoys, the arithmetic protocol (the operators plus the adaptTo...:andSend: methods) should simply be removed from String. While I did not perform any extensive testing, I did remove them in a Squeak (Morphic) image and nothing seemed to break. Even for Squeak, I think the solution should be the same and Etoys should be fixed to not use this particular hack. Florin On 5/26/2015 2:20 AM, stepharo wrote:
Hi florin
I agree with you. If you have some cycles to propose a fix we would be delighted.
Stef
Le 25/5/15 19:24, Florin Mateoc a écrit :
On 5/25/2015 6:02 AM, stepharo wrote:
The problem is that while the intention was nice 5 + (1 to: 10) could make sense, its side effects are worse.
Stef
I don't think there is anything wrong with your example, which is about vector operations and which I think make sense (I would have preferred if the result of the evaluation would have been an interval as well though). They are also part of the original protocol.
I was only protesting the later addition of the arithmetic protocol to strings. It does not make sense to treat strings as vectors and there are no clear semantics for some other kind of string-specific arithmetic operations.
Florin