Export/import for C?

rwl at uvacs.UUCP rwl at uvacs.UUCP
Mon Jul 14 00:13:43 AEST 1986


> 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'.
> The same arguments apply to variables as functions.
:
> Ok, it's going to mean more typing during initial coding.  But how much
> debugging time will it save you?   *Anything* which encourages modular
> programming has got to be a good idea.
:
> Jeremy Harris					...!mcvax!ukc!hrc63!miduet!jgh
> (I don't speak for my employer)			jgh at 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''.

The language is ``flat'': it provides for a set of functions which I organize
to my liking.  I definitely prefer this programming paradigm to the European
style (a la Pascal, Modula2, Ada) which enforces it's own notion of structure
at my expense.  I suppose my attitude is that modular programming is not a
``good idea'' carved in stone; it should be applied as needed.  No more, no
less.  Unlike some languages, C gives me the freedom to use my discretion.
 
Though I didn't look at your path at first, the thing that crossed my mind
while reading was that munging C in this way was down right un-American. :-)

-- 

Ray Lubinsky	University of Virginia, Department of Computer Science
		UUCP:  ...!cbosgd!uvacs!rwl or ...!decvax!mcnc!ncsu!uvacs!rwl
		CSNET: rwl at virginia



More information about the Comp.lang.c mailing list