Index: [thread] [date] [subject] [author]
  From: Huned M. Botee <huned.botee@duke.edu>
  To  : 
  Date: Mon, 01 Feb 1999 03:45:58 +0000

Re: lab reference

Tim Bain wrote:
> I've got a similar question...  Is it acceptably object-oreinted/
> encapsulated/whatever to have a large switch statement to
> determine which operator/function/variable should be called
> and then add the appropriate node to the expression tree?
> Or is there a different, better way we should be attacking
> the problem?

First, read the above. Second, note that I would STRONGLY suggest
AGAINST doing it.

In class, Professor Duvall demonstrated how such a switch statement
could be eliminated by a carefully thought out inheritance hierarchy.
Please see the expression tree demo code.

So, to directly answer your question: it's not really acceptable.

Good luck, etc.
huned

Huned M. Botee, UTAesque
huned.botee@duke.edu


Index: [thread] [date] [subject] [author]