Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!SUN.COM!wmb From: wmb@SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: Standard interface to windows? Message-ID: <8912280627.AA03786@jade.berkeley.edu> Date: 27 Dec 89 22:37:14 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Forth Interest Group International List Organization: The Internet Lines: 40 > A standard *program interface* to the windowing system can be devised > just as easily as a standard program interface to, say, files. In *principle* this is true, but in practice it is not even close to true. Window systems are several orders of magnitude more complicated than file systems, and the differences between different window systems are profound, whereas the differences between different file systems are comparatively trivial. You can learn all you need to know about Unix files by reading about 5 pages of documentation. Ditto for DOS files or CP/M files or whatever. The Macintosh window system is documented by HUNDREDS of pages of text; ditto for GEM, etc. The imaging models for various window systems are drastically different (pixel-based vs. spline/stencil/ink, automatic clipping vs. programmer-controlled clipping, different font models, gadget interaction managed by the programmer vs. by the OS, automatic vs. non-automatic mouse cursor clipping, etc). The input distribution models are drastically different. At an even more profound level, the distinction between server-based and client-based window systems affects the way applications are coded. It would be possible to build an abstract interface that would fit on top of any system, but that abstract interface would probably be so big, baroque, and slow that nobody would use it. I designed and implemented my portable file system interface on top of 2 different underlying file systems on 2 different CPUs in a matter of weeks, when I was still a novice Forth programmer. It took me months to produce a satisfactory high level interface to just one window system (GEM), working with a better Forth development environment, and with 5 years of Forth experience under my belt. Some of this high level interface that I developed might be useable on other window systems, but I believe that it would take a whole lot more work in addition, and the portability compromises would probably make the performance suffer. Mitch