[Curious] Integer division => fraction

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Jun 16 07:45:31 UTC 2003


Karl Ramberg <karl.ramberg at chello.se> wrote:
	Another issue that cause confusion with points is when you write:
	3 at 4 + 5 at 6 =>  a B3DVector3(8.0 9.0 6.0)
	This is of course the right answer but not what _I_ expected at all, 
	which is:
	(3 at 4) + (5 at 6) => 8 at 10

A few years ago I was rapped firmly, but firmly, over the knuckles for
saying that Smalltalk had operators.  They are, of course, binary messages.
The fact that x $ y # z . w parses as (((x $ y) # z) . w) whatever the
binary messages $ # . may be (and I was careful to chose ones which are
not legal binary message names) has nothing to do with Point as such.
At least you didn't find that 1+1*2 was 4 instead of 3.



More information about the Squeak-dev mailing list