entry at other than main (was: want to know)

Karl Heuer karl at haddock.ima.isc.com
Sat Sep 2 08:37:40 AEST 1989


In article <2634 at trantor.harris-atd.com> bbadger at x102c.harris-atd.com (Badger BA 64810) writes:
>Well, it really is only a small detail, but it is a completely unnecessary

Clearly *some* method is necessary to indicate where execution should begin.
I happen to think that invoking a function with a known name is the most
elegant solution I've seen so far.

>If the burden of proof was on putting ``main()'' into a new language, instead
>of taking it out of a language, how would you stand?

That was addressed to Doug, but I'll answer it anyway.  I'd put it in.

But I see it the other way around; it's not so much a matter of "adding main()
to the language" as "removing PROGRAM from the language".  It's simpler.  In
FORTRAN, you've got three types of subprogram: functions, subroutines, and the
main program.  In C, all three are combined into a single uniform entity.  I
consider this a plus.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list