Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wateng.UUCP Path: utzoo!watmath!wateng!ksbszabo From: ksbszabo@wateng.UUCP (Kevin S. B. Szabo) Newsgroups: net.unix-wizards Subject: Re: _print/_doprnt; curses on sys III Message-ID: <1101@wateng.UUCP> Date: Mon, 18-Jun-84 01:53:16 EDT Article-I.D.: wateng.1101 Posted: Mon Jun 18 01:53:16 1984 Date-Received: Mon, 18-Jun-84 06:49:15 EDT References: <148@gargoyle.UChicago.UUCP> <1973@utcsstat.UUCP>, <4558@utcsrgv.UUCP> Organization: U of Waterloo, Ontario Lines: 32 In article <1973@utcsstat.UUCP> geoff@utcsstat.UUCP (Geoff Collyer) writes: ~| Any program that calls _doprnt (or _print or whatever) directly is ~| *broken*. The internals of a given stdio implementation are the ~| business of no one but its author(s) and maintainer(s). And Dave Sherman replies: ~|Geoff, you would be correct to call such programs "non-portable". ~|I think "broken" is going a little too far. I have some implementations ~|which "work" just fine. ~|sprintf'ing into a buffer isn't always the answer. For one, it ~|requires two or more lines of code for what is conceptually one ~|action. Dave, I'm sorry but I and many others (I hope), don't agree. The program implementation is worse that unportable, it is unmaintainable. Sure, the author can maintain it and will probably continue to keep it humming perfectly on many systems. But if he/she ever leaves and someone has to a) fix the code because of an internal, supposedly transparent change to stdio; or b) port the code to a machine with a totally reworked stdio; the maintainer will have to spend many unecessary hours trying to find all the hidden dependancies on an undocumented internal system routine. Besides, two lines of code is a small price to pay for clarity, portability and *maintainability*. All this from someone who wrote in SP-1 ESS* assembler for a year. Yuck, talk about un-maintainable. *SP-1 ESS (Stored Program One, Electronic Switching System. Designed by Bell-Northern Research circa 1967. All programs in assembler, at least 100-200 thousand lines per version). -- Kevin Szabo watmath!wateng!ksbszabo (Elec Eng, U of Waterloo)