From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Cross Message-Id: <200104281639.MAA03463@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] the declaration of main() In-Reply-To: <200104281554.LAA13061@egyptian-gods.MIT.EDU> References: <3AE99688.96A84266@arl.army.mil> Cc: Date: Sat, 28 Apr 2001 12:39:25 -0400 Topicbox-Message-UUID: 961c4a40-eac9-11e9-9e20-41e7f4b1d025 In article <200104281554.LAA13061@egyptian-gods.MIT.EDU> you write: >Yes, main() could have been renamed to strmain() or start() or >whatever. It would have been less elegant (since main is, after all, >a good name) and ANSI C programs still wouldn't run normally because >the loader wouldn't know how to invoke main() (since the designers >don't want to pollute the system with backward compatibility >features). Really, your issue is not with that particular decision >but with the basic design goals of the system, and those are unlikely >to change. I don't agree that this is what Doug is saying; I think he's just saying that compatability could have been achieved in a more seamless fashion. He has a point, and indeed, someone today ran into problems trying to mix `native' Plan 9 functions with functions taken from the APE. (Sorry, I didn't pay close enough attention to see who it was!) Also, you're off on the linker part; he gave an example of a library function which would, ``do the right thing'' in that arena. (The C startup code would invoke mains(), taken out of a library, which, in turn, would call main()). On a personal note, I think that ``mains()'' is a cool name. I don't think that anyone is saying that there's no useful software written under Unix or in ISO C (note, for instance, that awk is brought in under the APE). The question is more, ``is the APE sufficient for supportng that software?'' In most cases, I think so. The other part of the equation, and one which I think Doug is addressing is, ``is the APE sufficient for writing software to port to other systems?'' Again, I think so; though I've never tried. True, one cannot easily mix and match `native' Plan 9 and APE functions, but I think that might be a good thing. - Dan C.