[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To OO or not to OO?



At 7:16 PM 3/5/95, Ken Tilton wrote:
 >I am porting (OK, rewriting <g>) my sort-of expert-system app from straight C
 >to MCL.
 >
 >I was all stoked to see what my app would look like in OO form, but now I am
 >getting cold feet. My worry is performance, especially in regard to generic
 >function dispatch.

Most people go through an exploratory phase first, and save the
performance-tuning for last. Especially when you're writing a new sort of
program, premature optimization will make your program needlessly baroque
and/or limited. 

Your best bet is to go ahead and write in straight CLOS in a natural and
clear style, just to get all the functionality working first. You'll think
of many cool features along the way to add, I'm sure. Then, approach the
system as a whole and try to identify the critical parts where performance
matters.

Unlike C, you'll find you can re-architect substantial subcomponents of your
program without destroying the rest. You may be astonished to discover that
you spared yourself much agony in your design because the bottlenecks are
not where you would have thought.