9fans archive / 2001 / 04 / 703 /    prev next

From: Greg Hudson <ghudson@MIT.EDU>
Subject: Re: [9fans] the declaration of main()
Date: Sat, 28 Apr 2001 11:54:13 -0400

(In the futile hope of bringing this thread to an earlier close:)

Douglas Gwyn wrote:
> All that fighting a well-established standard does is to isolate you
> from the rest of the world.  Do you really think that there is no C
> code of value except for whatever has been constructed specifically
> for Plan 9?

You're questioning the basic assumption of Plan 9, which is: let's try
to make an interesting and elegant system by abandoning the base of
existing Unix and ANSI C software and making all the design decisions
as if in a vacuum.  The system looks a little like Unix and the
language looks a lot like C only because there's some overlap between
the designers of Plan 9 and the designers of Unix and C.

Yeah, Plan 9 is unlikely to achieve a significant market position as a
result, but that's okay; it's a research project.  If you think people
shouldn't do this kind of research, fine, but you're not going to
convince them to stop by holding extended conversations on their
mailing list.  (Particularly not by sparring with the misguided fans
who really do think there isn't much C code of value apart from what
the Plan 9 group has written, or who think that the ANSI C committee
was populated largely by untrained monkeys.)

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.