development

Just extend it

January 26, 2006 19:06:02.012

Chris Petrilli comments on a disagreement over class extensions between Chad Fowler and Ian Bicking. Here's what Chris has to say:

This is a blurry line in the world of truly dynamic languages, and it reminds me of the absurd notion of final in Java. There are times when I need to extend an existing class to provide additional functionality because that is where it belongs . Sometimes people put things in the wrong place, but the idea is that they should just “write a function” isn’t necessarily the right solution either.

I agree completely - better to put the method where it belongs than to introduce a bunch of wrapper classes. It's easier to understand, and easier to deal with - and I say this as someone who's been managing a set of class extensions for BottomFeeder through numerous releases of Cincom Smalltalk.

Simpler is better.

 Share Tweet This
-->