Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!apple!excelan!leadsv!practic!vlsisj!davidc From: davidc@vlsisj.VLSI.COM (David Chapman) Newsgroups: comp.object Subject: Re: Interpreters and OOD issues - A follow up Keywords: Interpreters OOD C++ Message-ID: <15360@vlsisj.VLSI.COM> Date: 14 Oct 89 02:18:05 GMT References: <27307@genrad.UUCP> Reply-To: davidc@vlsisj.UUCP (David Chapman) Organization: VLSI Technology Inc., San Jose, CA Lines: 25 In article <27307@genrad.UUCP> charlie@genrad.com (Charlie D. Havener) writes: >how Smalltalk does it. It seems to me that the binop node for Plus >is a more logical place to handle addition of different types. It could >... >Both of these schemes seem to require building a case statement into >the objects to handle the different possible types. A new type put into >the system then requires repairing all the case statements in all the Binops >which seems to be a red flag warning that the design is not Object oriented. Not all operators need to work for all data types. I defined a small language for data base queries that had a bunch of special types such as dates and times. You don't want to multiply two dates together! This would help you limit the damage. Recompiling the operators that need to operate on a new data type does not seem to be much of a burden to me. At least you don't have to recompile the entire system. The alternative is likely to be a set of meta-operators that can perform the specified operations on _anything_. That's a much harder problem. -- David Chapman {known world}!decwrl!vlsisj!fndry!davidc vlsisj!fndry!davidc@decwrl.dec.com