[REQ]Remove InputSensor>>mousePoint

Norton, Chris chrisn at Kronos.com
Mon Apr 5 21:58:44 UTC 1999


Hi Reinier & co.,

Although normally I consider method consolidation to be a laudable goal, I
personally prefer readable selector names over selectors with abbreviations.

In this case, I think that "mousePoint" is a lot more intuitive (from a
reuse perspective (see Celeste, Scamper, etc.)) than anything with "prim" in
it.  Usually code that is labeled "prim" is reserved for the bowels of the
system.  Why not just copy the primitive code into the "mousePoint" method
if you're concerned about speed?

So, I guess I'm arguing to keep the "mousePoint" and "cursorPoint"
selectors.

Just tossing in my 2 bits...

---==> Chris

PS>  Thanks for helping to speed up Squeak!  I applaud any and all efforts
in that area!!   :-)

PPS>  Does the single call that "mousePoint" makes to "primMousePt" really
make much of a difference from a time to execute perspective?


> -----Original Message-----
> From:	Reinier van Loon [SMTP:R.L.J.M.W.van.Loon at inter.nl.net]
> Sent:	Monday, April 05, 1999 3:58 PM
> To:	squeak at cs.uiuc.edu
> Subject:	[REQ]Remove InputSensor>>mousePoint
> 
> Dan et al.,
> 
> while studying InputSensor I found that it has 3 methods to answer the
> coordinates of the cursor:
> 
> a) mousePoint    = ^ self primMousePt
> b) cursorPoint     = ^ self cursorPoint
> c) primMousePt  =  <primitive: 90>
> 
> mousePoint has 11 senders, cursorPoint has 226! and primMousePt just 1.
> 
> Funny, the slowest method is used the most...
> 
> I propose:
> 
> a) to remove mousePoint;
> b) implement cursorPoint as <primitive: 90>.
> 
> Cheers, Reinier.





More information about the Squeak-dev mailing list