Monday, August 21, 2006

Hmm.

I threw out my somewhat convoluted "functional" experiments (see yesterday's posts) and went back to a more pythonic OO style. Why? When things aren't working, it's bloody difficult to put in a bunch of print statements to find out where and why.

This difficulty of debugging more than compensated for any benefits I could see.

I'm still using higher-order functions (ie. ones that take other functions as arguments) where it makes obvious sense. Eg. the tree copying routine is generic and accepts both its copy and filter criteria as arguments. But the other stuff is gone.

No comments: