🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4902

Re: C++ vs Objective-C

#4902
From: Alan Lovejoy
Date: Mon, 19 Oct 1987 13:29
47 lines
2655 bytes
In article <1579@pdn.UUCP> bob@pdn.UUCP (Bob Hickle) writes:
/In article <1549@pdn.UUCP>, bob@pdn.UUCP (me) writes:
/> representation of the internal parse tree.  Anyway, I believe (but may
/> be wrong here) that the Objective-C compiler also compiles the ordinary
/> C code in an Objective-C program.  It just happens to produce output
/> which is the same C code.  That does not mean that it has not been
/> compiled (ie. parsed, syntax checked, etc).
/
/Well, I was right in that I may be wrong.
/
/Jonathan Shopiro (AT&T Bell Labs) suggested that I try to compile the
/following program with the Objective-C compiler and figure out where
/the error message comes from.
/
/-------------------------------
/int	f();
/
/main()
/{
/	int	i = f;
/}
/-------------------------------
/
/I tried it and determined that the Objective-C compiler has nothing bad
/to say about this program.  It appears to pass it through (and prepends
/some header stuff on the front).  The C compiler of course complains
/about the assignment statement.
/
/So my previous statement that the Objective-C compiler 'compiles'
/ordinary C code in an Objective-C program was wrong.  Thats what I
/get for making claims without fully verifying them first.
/------------------------------------------------------------------------
/Bob Hickle				Paradyne Corporation
/{gatech,codas,ucf-cs}!usfvax2!pdn!bob	Mail stop LF-207
/Phone: (813) 530-2664			8550 Ulmerton Road, PO Box 2826
/					Largo, FL  34641
/

Not so fast, Bob. You should ask me first before rushing off to proclaim
your imperfections on linguistic matters.  It is not necessarily true
that Objective-C is not "compiling" the program fragment in your
example.  What your example does prove is that semantic analysis
(which usually amounts to type-checking) is not being performed.
Semantic analysis is not a requirement for a compiler (the Smalltalk
compiler doesn't do it, for example).

--alan@pdn
Technical Details
Message-ID: <1582@pdn.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!usfvax2!pdn!alan
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <1549@pdn.UUCP> <1579@pdn.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!usfvax2!pdn!alan
From: alan@pdn.UUCP (Alan Lovejoy)
Newsgroups: comp.lang.misc,comp.lang.smalltalk,comp.lang.c++
Subject: Re: C++ vs Objective-C
Message-ID: <1582@pdn.UUCP>
Date: Mon, 19-Oct-87 09:29:53 EDT
Article-I.D.: pdn.1582
Posted: Mon Oct 19 09:29:53 1987
Date-Received: Thu, 22-Oct-87 00:04:41 EDT
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <1549@pdn.UUCP> <1579@pdn.UUCP>
Reply-To: alan@pdn.UUCP (0000-Alan Lovejoy)
Organization: Paradyne Corporation, Largo, Florida
Lines: 47