Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!mcvax!jack From: jack@mcvax.UUCP Newsgroups: net.lang.c Subject: Re: Export/import for C? Message-ID: <7012@boring.mcvax.UUCP> Date: Wed, 16-Jul-86 05:02:34 EDT Article-I.D.: boring.7012 Posted: Wed Jul 16 05:02:34 1986 Date-Received: Thu, 17-Jul-86 06:54:59 EDT References: <131@kaist.UUCP> <175@miduet.mifnet.gec-mi-ate.co.uk> <640@uvacs.UUCP> Reply-To: jack@boring.uucp (Jack Jansen) Organization: AMOEBA project, CWI, Amsterdam Lines: 20 Apparently-To: rnews@mcvax In article <640@uvacs.UUCP> rwl@uvacs.UUCP writes: >> I think C's usage of 'static', as applied to functions, to mean 'don't export' >> is unfortunate. >: >> I would prefer the use of 'export' and 'import' as in Modula, with 'import' >> replacing 'extern'. >> (I don't speak for my employer) jgh@gec-mi-at.co.uk > >I can appreciate the aesthetics of export/import, but I don't think it would >improve my coding. One of the reasons that I like C is the idea of having a >grab-bag of functions at my disposal with the special exception of those which >have been explicitly hidden from me via ``static''. > This is exactly what you *don't* want! The situation in C is that the default is that a function is exported. This leads to the fact that most people will, unthinking, make a lot of functions extern, while they could have been static. An explicit 'export' could force you to think about it. -- Jack Jansen, jack@mcvax.UUCP The shell is my oyster.