What Whatever.Object isn't good for....
December 8, 2007, 10:05:59 am

So having just posted about how excited I am with Whatever.Object, I should point out what it's not good for - short lived objects. Specifically, I realized this doing Seaside-Mootools where I was representing a client side Javascript object as a Whatever.Object.

It was good to be able to have a shapeless object to represent another shapeless object, however, Whatever is designed to make the second access to an instance variable fast. That means if you want to make, say, 20 async callbacks, you're running the cost of creating the shape of an async callback javascript object dynamically 20 times instead of just once.

So I replaced Whatever.Object in Seaside-Mootools with a straight Dictionary and the VM load dropped significantly, giving me a nice speed boost. It's interesting to find out what a technique is good for/not good for.

By Rich Demers on December 8, 2007, 10:59:12 am

Comment by Rich Demers

Yes Michael, you are indeed exciting -- and maybe excited too.

By Rich Demers on December 8, 2007, 7:25:43 pm

Comment by Rich Demers

Ah, so you've changed your original text to say you are excited, instead of "exciting," thereby making my comment nonsensical. But that's OK, Michael, you are indeed an exciting Smalltalk talent. Lord, I wish I still had your energy and enthusiasm!

By Michael Lucas-Smith on December 9, 2007, 1:18:09 am

Comment by Michael Lucas-Smith

:) I just put aside some time to try out ideas. Sometimes they work, sometimes they don't.