Animal Verbing

drbrain | Tue, 21 Oct 2008 13:58:00 GMT

Posted in

Yesterday I was sitting with a bunch of Smalltalkers listening to them talk about Smalltalk Superpowers. They described rather mundane things like sender sender sender receiver which the receiver of the method that called into this library higher up the stack to fancier things like super super which allows you to skip over the parent classes when calling super to really fancy things like getting the address of an Object.

When Ryan told the Smalltalkers about our superpowers of duck typing, duck raping and monkey patching, the main response was “what’s with all the animal verbing?” These kinds of tricks seem so commonplace to the Smalltalkers that they have no names for them.

Why is it that Rubyists went with “animal verbing” for describing these practices?

PS: One of the things Ruby has that’s rather difficult in Smalltalk is object customization, o = Object.new; def o.my_method() end

Update: You can download videos of the various superpowers, or visit the official Smalltalk Superpowers website.

comments

Comments RSS FEED

Hi

Regarding what you call object customization, yes it is a little more difficult in Smalltalk but is definitely possible.
Its referred to as instance-specific-behavior described by Kent Beck (see http://books.google.com/books?id=Y7FwNB4GV4EC&pg=PA167&lpg=PA167&dq=kent+beck+instance+specific+behavior&source=web&ots=BVgyfbKakz&sig=bbblT4-uxePgcLOVWCZTCG5msXg&hl=en#PPA157,M1).

Basically in Dolphin Smalltalk you could do something like this to add a method ‘my_method’ that returns 42.

o := Object new.
o allowPerInstanceBehavior.
o class compile: 'my_method ^42'.

Cheers

snoobab said 1 day later

The reason is that ruby people are much more amusing. It’s like the difference between physicists and biologists. Physicists give us names like black hole and top quark. More amusing.

simon said 1 day later

snoobab: I think the ease of adding features and the ease of reuse of features in Smalltalk is amazing. Starting from the object prototyping superpower that was presented, it wouldn’t be hard to add something as simple as allowPerInstanceBehavior to Squeak, and you could reuse that forever easily. In Ruby, you have to have this file floating around with the extra code in it or remember to type it in again every time you want to use it. Not nearly as fun.

Eric Hodel said 2 days later

Comments are disabled