var args

Sam Kendall kendall at wjh12.UUCP
Mon Oct 17 19:47:45 AEST 1983


Henry at Utzoo notes, and seems to object to, the fact that variable 
argument functions are implemented nonportably, even though the package 
has a portable interface.  It seems to me that one of the good points of 
portable libraries such as the Standard I/O Library and the portable C 
library in general (not that there is just one) is the possibility of 
having a portable interface but a nonportable implementation.  There are 
other functions be that cannot have a single, portable implementation: 
setjmp() and longjmp(), for instance; and it may be advantageous to code 
functions in assembler or nonportable C, for efficiency, that could be 
coded portably in C.  

Here is a real difference between Ada and C (how perceptive of me!): Ada
is designed to make it much easier to give even seemingly
machine-dependent functions portable implementations, and to make it
easy to seperate the machine-dependent from the machine-independent
otherwise.  This is done by (1) moving machine dependencies into the
compiler, and (2) providing good language facilities for seperation,
such as (in C terms) the ability to seperate the structure members from
their layout, and to seperate enum members from their numeric values.
Not to mention a good way to seperate the government from its money.

	Sam Kendall		  {allegra,ihnp4}!wjh12!kendall
	Delft Consulting Corp.	    decvax!genrad!wjh12!kendall



More information about the Comp.lang.c mailing list