home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!newsun!news
- From: Duane Murphy <damurphy@wc.novell.com>
- Subject: Re: Multiple Interpreters
- Message-ID: <1993Jan28.210510.17299@novell.com>
- X-Xxdate: Thu, 28 Jan 93 21:12:47 GMT
- Sender: news@novell.com (The Netnews Manager)
- Nntp-Posting-Host: 130.57.72.123
- Organization: Novell, Inc.
- X-Useragent: Nuntius v1.1.1d12
- References: <1993Jan28.173729.29095@twg.com>
- Date: Thu, 28 Jan 1993 21:05:10 GMT
- Lines: 25
-
- David Herron, david@twg.com writes:
- >`unknown' looks for unknown commands in its parent before it looks
- >in MainInterp. Yes that's not quite the same thing as inheritance.
- >The other inheritance facility is `-chainCommand' (if someone can suggest
- >improved names for these things, I'm all ears...). Again, it's manual
- >but works like:
- >
- > interp newInterp
- > foreach cmd { a list of commands to inherit } {
- > newInterp -chainCommand $cmd parentInterp
- > }
-
- It is interesting to note that you have actually solved a short coming of
- typical objkect-oriented inheritance. That is when you inherit you get
- everything the parent has and add new features. Taking away features is
- actually quite difficult (not impossible, just not straightforward).
- With this method, you pick what you want to inherit from the parent.
-
- ...dam
-
- +------------------------+--------------------------------------------+
- | Duane Murphy | My opinions are mine, mine, and only mine; |
- | damurphy@wc.novell.com | Except when they are also yours. |
- | Macintosh Software QA | |
- +------------------------+--------------------------------------------+
-