Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!clyde!watmath!watnot!watmum!gvcormack From: gvcormack@watmum.UUCP (Gordon V. Cormack) Newsgroups: net.lang.c,net.lang.pascal Subject: Re: Interactive I/O in Pascal Message-ID: <563@watmum.UUCP> Date: Sat, 2-Aug-86 07:22:20 EDT Article-I.D.: watmum.563 Posted: Sat Aug 2 07:22:20 1986 Date-Received: Sat, 2-Aug-86 23:38:47 EDT References: <2222@brl-smoke.ARPA> <7014@boring.mcvax.UUCP> Organization: U of Waterloo, Ontario Lines: 27 Xref: mnetor net.lang.c:5540 net.lang.pascal:359 > > 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@waterloo cdn: gvcormack@mum.waterloo.cdn