Interactive I/O in Pascal

Gordon V. Cormack gvcormack at watmum.UUCP
Sat Aug 2 21:22:20 AEST 1986


> 
> Am I missing something?
> 
> Is there some characteristic of the Pascal language that prevents
> construction of a Pascal standard I/O package that *would* be as powerful
> as that of C?  Perhaps the existence of this characteristic is implicit in
> this discussion and that is what I am missing.  

There are lots of reasons one can't write printf in Pascal, and they
all contribute to the conclusion that Pascal is garbage.  Just
for starters, you can't (in Wirth's Pascal, anyway) even write
a procedure that takes a quoted string as a parameter, unless its
length is hard coded.  Next, you can't write a procedure that takes
a variable number of parameters.  Finally, you can't write a
*polymorphic* procedure that operates on many types, nor can you
even overload the name "printf" to make it apply to many types.

I wouldn't want anyone to take this article as support for C.
For a long time I have been suppressing the urge to post an article
to the effect:

   STOP!!  You're both wrong.
-- 
Gordon V. Cormack      CS Department, University of Waterloo
uucp:  { allegra, decvax, ... }!watmath!gvcormack
csnet: gvcormack%watmum at waterloo
cdn:   gvcormack at mum.waterloo.cdn



More information about the Comp.lang.c mailing list