Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!apple!oliveb!tymix!cirrusl!sun505!dhesi From: dhesi@sun505.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: C is NOT a portable assembler (was: want to know) Message-ID: <821@cirrusl.UUCP> Date: 29 Aug 89 15:46:32 GMT References: <1496@l.cc.purdue.edu> <2659@cbnewsc.ATT.COM> <2600@trantor.harris-atd.com> Reply-To: dhesi@cirrusl.UUCP (Rahul Dhesi) Organization: Cirrus Logic Inc. Lines: 24 In article <2600@trantor.harris-atd.com> bbadger@x102c.harris-atd.com (Badger BA 64810) writes: >The question here was whether ``main()'' is an attractive feature of >the C language. That is, why can't all routines have a programmer-chosen >name? This is an issue in expressiveness, and questions an apparently >gratuitous irregularity in the language. The question is really broader, and much more philospphical: Should information about the entry point be encoded in the C program itself, or should it be external to the program? (The "entry point" of a C program is where the C virtual machine defined by the language begins execution, which may not be the place where execution actually begins.) For my money, I had better be able to tell, just by looking at the C source, where execution will begin. Whether I do this by grepping for 'main.*(', or by searching for '#pragma begin_here' or 'hey mr. linker, make my day, start this program here i say' etc., is a syntactic detail in the same category as using { and } rather than BEGIN and END. -- Rahul Dhesi UUCP: oliveb!cirrusl!dhesi