Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site mordor.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gatech!ut-sally!mordor!jdb From: jdb@mordor.UUCP (John Bruner) Newsgroups: net.lang.c Subject: Re: Windows Message-ID: <4590@mordor.UUCP> Date: Tue, 3-Dec-85 19:52:21 EST Article-I.D.: mordor.4590 Posted: Tue Dec 3 19:52:21 1985 Date-Received: Thu, 5-Dec-85 06:27:46 EST References: <134@brl-tgr.ARPA> <150@brl-tgr.ARPA> <6191@utzoo.UUCP> Reply-To: jdb@mordor.UUCP (John Bruner) Organization: S-1 Project, LLNL Lines: 46 >>> Are you saying you want to write different programs to accomplish the >>> same thing on all these machines? >> Why not? Is that too idealistic or something? >No, it's just too much (silly, unnecessary) work. The biggest difficulty that I see with regard to writing portable programs for many different window environments is the diverse system interfaces involved. I have always tried to code in a portable fashion (even to the extent that I still consider some factors which many people have long abandoned, like the number of significant characters in variable names). It isn't difficult to write a large number of useful programs in C which operate in a tty or "glass tty" environment. The standard I/O library is a useful common denominator (although not as common as it once was, unless you resist the temptation to use any of the enhancements that have been added in some implementations). I have no idea how to approach the corresponding task in a bit-mapped display environment. The user interfaces of two machines I use frequently -- a Sun and a Macintosh -- are significantly different. I haven't written window-oriented programs for the Sun, but I would expect its program interface to be significantly different from the Macintosh's Toolbox. The Macintosh event-driven interface has a significant impact upon the design of Macintosh software. (At least, it has an impact upon software that is designed to follow the Macintosh user interface guidelines.) I would expect the interfaces on the Amiga, Atari ST, IBM PC, Sun, BLIT, to have a similar effect on programs. It isn't clear to me how to encapsulate system-dependent code so that a program could be easily ported from -- say -- curses on an Ann Arbor Ambassador to a Macintosh. There is no stdio-like common denominator for this sort of environment. Going the opposite direction is even harder (I notice, for instance, that "dbxtool" only runs under Suntools, although one could conceive of an implementation for cursor-addressible terminals). I do agree with the stated goal that programs should be portable. It just isn't clear to me how to accomplish this when the output device isn't constrained to be compatible with a printing terminal or (perhaps) cursor-addressible CRT. -- John Bruner (S-1 Project, Lawrence Livermore National Laboratory) MILNET: jdb@mordor [jdb@s1-c.ARPA] (415) 422-0758 UUCP: ...!ucbvax!dual!mordor!jdb ...!seismo!mordor!jdb