Article View: comp.lang.objective-c
Article #388Re: Objective-C and C++ (at the same time)
From: Ben Youngdahl
Date: Thu, 24 Feb 1994 16:12
Date: Thu, 24 Feb 1994 16:12
39 lines
2756 bytes
2756 bytes
In article <PFKEB.94Feb24065330@kaon.SLAC.Stanford.EDU> Paul F. Kunz, pfkeb@kaon.SLAC.Stanford.EDU writes: >>>>>> On 24 Feb 1994 04:38:19 GMT, mgritter@gac.edu (Mark Gritter) said: >In article <2khavrINN9ph@news.gac.edu> mgritter@gac.edu (Mark Gritter) writes: > > >> While gnu gcc (version 2.3.3) will compile both C++ and Objective C, >> it won't do both at once. Is there a compiler that will recognize >> both C++ and Objective C in the same file? > > The NeXT version of gcc will do C++ and Objective-C at the same >time. It's really a language called Objective-C++. Look at >/NextDeveloper/Examples/appkit/CalculatorLab++ to see an exemple. > > The Objective-C++ language is a nice means of marrying your numeric >model written in C++ with your GUI written in Objective-C. >-- >Paul F. Kunz Paul_Kunz@slac.stanford.edu (NeXT mail ok) >Stanford Linear Accelerator Center, Stanford University >Voice: (415) 926-2884 (NeXT) Fax: (415) 926-3587 This sounds interesting... is this Objective-C++ only available to NeXT users? Does it allow multiple inheritence? (I seem to remember that objective-C alone did not) Can a class have one method written in Objective-C, and another written in C++? How freely can you mix the code? Please pardon my struggling to remember objective-C syntax, but I seem to recall that one of the best things about Objective-C was the run-time binding of calling methods. I.e., you want to call the method "foo" for an object "bar", you'd do: [bar "foo"] or something like that, and if the object "bar" didn't have a "foo" method, ... no harm done. Am I correct? Ben
Technical Details
Message-ID:
<CLqL0u.9KL@cdsmail.cdc.com>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!cdsmail!ben.cpg.cdc.com!Ben.YoungdahlReferences:
<2khavrINN9ph@news.gac.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,bfb0af118239035a X-Google-Attributes: gid109fba,public X-Google-Thread: 10ba33,bfb0af118239035a X-Google-Attributes: gid10ba33,public X-Google-Thread: 1111a3,bfb0af118239035a X-Google-Attributes: gid1111a3,public X-Google-Thread: f9256,bfb0af118239035a X-Google-Attributes: gidf9256,public X-Google-ArrivalTime: 1994-02-24 08:12:29 PST Newsgroups: comp.lang.objective-c,comp.lang.c++,comp.sys.next.programmer,gnu.g++.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!cdsmail!ben.cpg.cdc.com!Ben.Youngdahl From: Ben Youngdahl <Ben.Youngdahl@cdc.com> Subject: Re: Objective-C and C++ (at the same time) Organization: Control Data Systems, Inc. Date: Thu, 24 Feb 1994 16:12:29 GMT Message-ID: <CLqL0u.9KL@cdsmail.cdc.com> X-Xxmessage-Id: <A9922C199901A109@ben.cpg.cdc.com> X-Useragent: Version 1.1.3 References: <2khavrINN9ph@news.gac.edu> Sender: usenet@cdsmail.cdc.com (News Poster) X-Xxdate: Thu, 24 Feb 94 16:04:09 GMT Lines: 39