[net.lang.c] Export/import for C?

rwl@uvacs.UUCP (07/13/86)

> 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@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@virginia

jack@mcvax.UUCP (07/16/86)

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.