Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!ichthyosaur.cis.ohio-state.edu!elwell From: elwell@ichthyosaur.cis.ohio-state.edu (Clayton M. Elwell) Newsgroups: comp.windows.news Subject: Re: implementation of inheritance within PostScript Message-ID: <17855@tut.cis.ohio-state.edu> Date: 14 Jul 88 21:45:48 GMT References: <8807140607.AA07096@brillig.umd.edu> Sender: news@tut.cis.ohio-state.edu Organization: The Ohio State University Dept of Computer and Information Science Lines: 27 marshall@software.ORG (Eric Marshall) writes: Did Sun extend PostScript to incorporate inheritance, or do the NeWS operators used to implement inheritance only need PostScript's predefined dictionary semantics? It's pretty slick--they use just plain ole PostScript. Basically, objects are dictionaries, and the dictionary stack is used to handle inheritance. Methods are invoked with an explicit 'send' call, as in: framebuffer /new DefaultWindow send which calls the 'new' method of the object (class) DefaultWindow. By the time the method gets control, the operand stack is cleaned up, so the value of 'framebuffer' is available as an argument to the method. There are some performance hacks that take advantage of the fact that procedures in PostScript are really arrays deep in their hearts, and thus can be taken apart and put back together differently, but it's all strictly by the book (the red one, in this case). If you want to do object-based stuff on your printer, it'll run... Clayton M. ElwellOhio State University CIS Dept. Research Computing Facility "... there was a *third* possibility that we hadn't even counted upon ..." --Arlo Guthrie, "Alice's Restaurant"