look at @
the point creation method is sped up using an optional primitive call.

@ y
        "Primitive. Answer a Point whose x value is the receiver and whose y
        value is the argument. Optional. No Lookup. See Object documentation
        whatIsAPrimitive."

        <primitive: 18>
        ^Point x: self y: y

(a) Time millisecondsToRun:[50000 timesRepeat: [EMAIL PROTECTED]  ->  12

then I commentet the primitive call to see the diffirence in Number>>@
and I saw no difference...
so I put a self halt in @

and the method isn't stopped when I redo (a).

but if I do that in a worspace:

|a|
a := 1. self halt.
Time millisecondsToRun:[50000 timesRepeat: [1@(a+1)]].

It stops and then the halt in #@ works ok ...

any idea of what I did wrong ?

Thanks
Cédrick

_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to