Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!uvaarpa!mcnc!thorin!luther!tuck From: tuck@luther.cs.unc.edu (Russ Tuck) Newsgroups: comp.lang.c++ Subject: Re: objective C Message-ID: <8016@thorin.cs.unc.edu> Date: 3 May 89 15:15:41 GMT References: <2614@ssc-vax.UUCP> <3180@stpstn.UUCP> <15327@gryphon.COM> <1546@sw1e.UUCP> Sender: news@thorin.cs.unc.edu Reply-To: tuck@luther.UUCP (Russ Tuck) Organization: University Of North Carolina, Chapel Hill Lines: 27 In article <1546@sw1e.UUCP> uucibg@sw1e.UUCP (Brian Gilstrap [5-3929]) writes: >Joe writes a class called Window and compiles it for a particular workstation/ >OS release. The implementation of Window is of arbitrary complexity (e.g. it >may involve virtual functions or any other construct allowed by C++). He then >sends the compiled file plus a '.h' to Fred. > >Fred uses the .h to write a class derived from Window, compiles it, and links >it together with the object file for Window (along with other stuff) to produce >a working program. > >Will this work? Of course! C++ is a superset of C, so if C can do it, so can C++. This includes separate compilation. (There are a few minor syntactic differences that make C++ not a precise C superset, but it's rare to need to worry about them.) >... how to you handle inline functions of a class? The source to inline functions is in the .h file. (Since inline functions are only useful if very small, typically one-liners or even a single variable reference, I don't think this will bother vendors of binary-only libraries.) Russ Tuck internet: tuck@cs.unc.edu Computer Science Dept., Sitterson Hall csnet: tuck@unc University of North Carolina uucp: ...!mcnc!unc!tuck Chapel Hill, NC 27599-3175, USA Phone: (919) 962-1755 or 962-1932