[FYI] Java vs Squeak/Smalltalk
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Mon Jan 21 01:19:18 UTC 2002
"Joerg Beekmann" <jbeekmann.deepcove at telus.net> wrote:
For example the following shows the primative (sic)
types poking through:
(ByteArray new: 5) at: 1 put: 8
v.s.
(ByteArray new: 5) at: 1 put: 'foo'
When I try this, I get "Error: Improper store into indexable object".
I see no primitive types here. I see a <primitive> METHOD, and the
comment says that the item to be stored must be of the right "type",
but there is no suggestion that this "type" is a primitive type.
And of course, "byte" is *not* a primitive type in Squeak.
The elements of the ByteArray show in in the debugger just like the
elements on an unconstrained array; a 0 stored in a ByteArray doesn't
look any different from other 0s.
More information about the Squeak-dev
mailing list
|