[FYI] Java vs Squeak/Smalltalk

Ken Kahn kenkahn at toontalk.com
Sun Jan 20 00:11:27 UTC 2002


Joerg Beekmann wrote:

>
> (ByteArray new: 5) at: 1 put: 8

When I first glanced at your example I expected you to bring up a different
point on this topic. Maybe I'm confused about Squeak and Smalltalk but I
believe they come very close to allowing one to implement transparent
forwarders but don't go all the way. Suppose the 5 in the example above was
an instance of a user class that tries to behave like a number. It does
arithmetic, printing, etc. just fine. Maybe all it does is forward all
messages to a primitive 5. So can you substitute such an object for the 5 in
the example above or does the primitive for creating ByteArrays work only if
a built-in number follows new: ?

Best,

-ken kahn ( www.toontalk.com )




More information about the Squeak-dev mailing list