[Newbies] assorted beginner questions

Mark Smithfield m_smithfield at yahoo.com
Wed Oct 3 03:22:01 UTC 2007

This is a mixed bag. These are the questions that I
would ask an
informed friend. They might be obvious, but they are
not obvious
to me (yet, I hope).
As I read code in Squeak, I discover method names that
I do not
know. How do you find these methods if you don't know
the type of
the receiver? For example,

    self subclassResponsibility.
In the floor method from Number,

    truncation _ self truncated.

What does the underscore mean?
I want to apply smalltalk to fibonacci numbers. I add
this method
to Integer,

    (self = 0) ifTrue: (^0)
    (self = 1) ifTrue: (^1)
    ^ (self - 1 fib) + (self - 2 fib).

Next, I would like to memoize this method, (because of
enormous performance gains).  I do not see how to
memo-ize things
in smalltalk. Can somebody help me see the necessary
shift in


Would a smalltalker even take this approach? 

I am still waiting for things to >click< w/rt
smalltalk.  I know
that I don't know and that's all that I know :) 

Thanks to all the people on this list for letting this
list be a
place where you can ask questions in this fashion w/o
certainty of abuse and dismissal. 


Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.

More information about the Beginners mailing list