Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!lll-winken!unixhub!shelby!neon!pescadero.Stanford.EDU!philip From: philip@pescadero.Stanford.EDU (Philip Machanick) Newsgroups: comp.lang.c++ Subject: Re: Class instance variables (was Re: inheriting statics) Message-ID: <1990Nov18.023608.5339@Neon.Stanford.EDU> Date: 18 Nov 90 02:36:08 GMT References: <1990Nov13.072057.18707@Neon.Stanford.EDU> <1990Nov14.212657.5671@Neon.Stanford.EDU> <11936@life.ai.mit.edu> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: philip@pescadero.stanford.edu Organization: Computer Science Department, Stanford University Lines: 15 In article <11936@life.ai.mit.edu>, rpk@rice-chex.ai.mit.edu (Robert Krajewski) writes: |> Hmm. At first I was thinking, ``Well, you really can't class instance |> variables with the current C++ model because there really isn't a |> run-time expression of classes in C++.'' But if you have any virtual |> functions in a class, there *is* a per-class thing that lives at |> run-time -- its table of virtual functions. So maybe one could |> overload (!) the Vtable concept, and use negative offsets to the |> VTable pointer for class instance variables, and then just add |> inherited class instance variables before the superclass. |> |> Just a thought, mind you... Interesting idea. How about a new kind of class member: virtual static? -- Philip Machanick philip@pescadero.stanford.edu