Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!mahendo!wlbr!hacgate!tcville!sed170!lee From: lee@sed170.HAC.COM (John Lee) Newsgroups: comp.sys.amiga.tech Subject: Re: Programming MS-Windows vs. Amiga (Re: resource tracking) Message-ID: <340@sed170.HAC.COM> Date: 6 Mar 90 20:01:23 GMT References: <1165@lpami.wimsey.bc.ca> <5214@sugar.hackercorp.com> <23118@usc.edu> <5219@sugar.hackercorp.com> <23157@usc.edu> Reply-To: lee@sed170.UUCP (John Lee) Organization: Hughes Aircraft Co., El Segundo, CA Lines: 61 In article <23157@usc.edu> papa@pollux.usc.edu (Marco Papa) writes: >In article <5219@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes: >>(I just saw a joke >>on the net: "What's bigger than Hello World in X?" "Hello World in Microsoft >>Windows!"). > >Well, Hello World in X with the Toolkit is about 10 lines of code and data. >Try to do the same with the Amiga and take a look at the result. Note that >the hello World program must accept any font on the command line, any color >for background/foreground, center the text vertically and horizontally, >and continue to do so at any window resize. I doubt that you could do it >in 10 lines (or even 30 lines for that matter) on the Amiga. > >Note. I am not trying to put down the Amiga. BUT, there are positive and >negative things in everything. > >-- Marco You, of all people Marco, know that this comparison is not quite legitimate. While the main program can indeed 10 lines or less, try for ICCCM compliance and I'd love to see less than 50 lines. The code for the Toolkit, widgets and Xlib has been hidden in the object files/libraries you link with. I can very easily create the same situation on the amiga or any other system by abstracting everything in pre-compiled modules, leaving a main() with about 3 lines. I will concede the difference being that under using a Toolkit under X most of the work has been done by someone else (usually but now always) beforehand and that a similar library of gadgets/widgets does not really exist on the Amiga. However, in the real world, most of the widgets needed for the X11 project I work on do not exist (even in the DECwindow toolkit) and we have had to implement about 75% of the widgets we use from scratch. Basically it comes down to this: How do you decide when a program under one environment is larger/smaller than another program with similar functionality under a different environment? And how do you decide the actual size of the program? Well, you could look at the main() and count lines of code, but that's not a good comparison as shown above. If you examine the size of the executable, what about shared libraries? Why don't you count those as well? What about programmer effort? First of all, this is highly subjective at best, but we could try. Again, not very good. When functions are written by different people, whose effort do we include, and whose do we exclude? One programmer may have a library of utility functions equivalent to an X Toolkit. Do we include the effort that went into the library as well? In short, this is as useful "My machine is better than yours." As a joke, "What's bigger than Hello World in X?" is fine, but (and this applies to everyone) let's keep the discussion limited to differences/comparison of features/improvements. --John Lee ------------------------------------------------------------------------------- Raining CATS and DOGS? Join the RATS: Remote Amiga Teleconferencing System +--------+ John Lee | HUGHES | +--------+ ARPAnet: jhlee@hac2arpa.hac.com Hughes Aircraft Company The above opinions are those of the user and not of those of this machine.