"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Monday, April 09, 2007

Rediscovering Smalltalk Kind Of

Rubyists are rediscovering Smalltalk, or at least its idioms, often one at a time...

>> class A
>>   def a_whole_new_me
>>     self.class.new
>>   end
>> end
>> a = A.new
>> a.class
=> A
>> a.a_whole_new_me.class
=> A
>> class B < A; end
>> b = B.new
>> b.class
=> B
>> b.a_whole_new_me.class
=> B
Attention all Rubyists, buy these books...

1 comment:

Ed said...

There was a used Smalltalk With Style on Amazon for under $6! I win! :) I'll wait on the other one for now. Thanks for the recommendation.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.