Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!rutgers!dptg!att!cbnewsk!ech From: ech@cbnewsk.ATT.COM (ned.horvath) Newsgroups: comp.sys.mac.programmer Subject: Re: C++ for the Mac Message-ID: <669@cbnewsk.ATT.COM> Date: 24 Jul 89 19:31:01 GMT References: <8060@hoptoad.uucp> Organization: AT&T Bell Laboratories Lines: 32 Earlier, I wrote: >Also, the full power of MPW C++ will be available ONLY in applications: >method dispatching will use global variables, which the brain-damaged >MPW linker STILL insists must be A5-relative. From article <8060@hoptoad.uucp>, by tim@hoptoad.uucp (Tim Maroney): > So? You can write your own A5 management in code resources under MPW. > I've done this -- it's pretty easy. The only thing I couldn't manage > was initialization to non-zero values (and if I'd spent a few days > on it, I'm sure I could have cracked that too -- it just didn't seem > very important). It's not as easy as under Lightspeed C, granted, > but it's hardly as close to impossible as you're saying. Shucks, Tim, I wrote that part of the Aztec linker, including nonzero initialization. But when you are talking C++, you ARE talking about nonzero initialization, and running new() overloads as part of that initialization. And when you are talking about method-dispatch tables, you are talking about data initialized from information provided only by the compiler and effectively usable by the linker alone. Yes, I suppose I could ask the MPW linker to create a symbol table, and I suppose I could write a "post-linker" to put that information into a resource where my DA's open could find it, and I suppose I might even be able to track changes in Apple's C++ and MPW naming conventions and object-file symbol conventions for my own personal use. Or I suppose I could write my own linker to do it "right." Perhaps you could, too. So I'll rephrase my original statement, thus: unless you are a Maroney- class guru, and you are prepared to do one shitload of work, you aren't going to be using virtual methods in non-applications any time soon. =Ned Horvath=