From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3AE895FB.D6454F2@arl.army.mil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <20010426194237.43F56199DC@mail.cse.psu.edu> Subject: Re: [9fans] the declaration of main() Date: Fri, 27 Apr 2001 09:13:16 +0000 Topicbox-Message-UUID: 93db019a-eac9-11e9-9e20-41e7f4b1d025 Russ Cox wrote: > > No, that choice pretty much forced the existence of an APE. > > If the standard extern interfaces had been honored, Plan 9 > > C could support both the native Plan 9 way of doing things > > *and* Standard C, without requiring any flags etc. > This is just bogus. The whole point of Plan 9 is that > everything has been rethought. What forced the existence > of an APE was the desire to compile and run some large legacy programs > without infecting the rest of the system with external > garbage. Changing the definition of main to return int > would not eliminate the benefits of an APE any more than > anarchy would eliminate the benefits of prisons. Look, nobody appreciates elegance more than I do, but there is nothing intrinsic in the Plan 9 native C environment that required any incompatibility with Standard C even if there had never been an APE. Non-native headers have no effect if they're not included; the interface to main() is not an issue if Plan 9 had not insisted on using the same name for an incompatible function. This could still be fixed fairly easily, along the lines I indicated previously. It is *not* true that in Plan 9 "everything has been rethought". Considerable effort was expended to make Plan 9 C (Ken's C) compatible with the C standard insofar as the "language" part goes, with the notable exception of main(). Compatibility with the "library" part would have merely required staying out of its way. The idea that unused headers and unused library functions would somehow "infect" a system is irrational.