One of the 'fun' things about trying to build a semi-generic1 object system--heck, the fun thing about almost any system--is knowing where to draw the line between things. What's in the system, what's not in the system, and where do you put the things that are in the system? Figuring out those three things is important, and once you've got them most of the hard work is done.
Deciding what to leave out is definitely separate from deciding what to put into a system. It may seem like they're essentially the same, but they're not. For example, we've decided specifically to include classes in the object model, but we've chosen specifically to not include classless objects in the object model. (Though, honestly, you can still do it if you want) A difference? I think so.
Of course, it's important to decide what goes into a system. That almost goes without saying, though some people's judgements are different than others as to what goes in. Putting a feature in is a conscious decision.
Leaving things out, though, can be done by accident. What's not in a system can be a matter of omission, encompassing all the things you didn't think to include. I'd argue that this is a bad thing. Sure, with any large system there's a huge number of things you can choose to do or not do, and sometimes you have to prune by category, but it's important that you put thought into what you leave out.
When you exclude things on purpose, it means you've put at least a little thought into what's getting excluded. Might not be enough, but at least it's something--the exclusion is purposeful. The feature has been considered and discarded. When you exclude by accident, because you didn't think about it, you don't know for sure whether the feature would've been good or not. You might've left it out anyway, but you don't know--you didn't look at it, and that's bad. You can also look at a feature and decide to defer it rather than discard it, and build the design so that it can be added afterward.
Where it really comes out is later, when you're working on a system to add new things, and you find that you can't, because what you're looking to add has already been excluded. Threads often fall into this category, as does multi-character-set or Unicode text processing. It wasn't thought about, and was excluded by default rather than on purpose, and in a way that was bad because you didn't really want to exclude it, just defer it.
1 I'm firmly convinced that a truly generic object system is either completely untenable, or doomed to be so slow without an insane amount of engineering work as to be untenable, given the number of things that get lumped into the group 'object system'
Posted by Dan at March 12, 2003 03:26 PM | TrackBack (0)