Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!olivey!jerry From: jerry@olivey.olivetti.com (Jerry Aguirre) Newsgroups: news.software.b Subject: Re: NNTP vs Cnews (was: Re: Cnews is not for me) Summary: Is "portability" too expensive? Message-ID: <47046@oliveb.olivetti.com> Date: 24 Aug 89 05:58:22 GMT References: <2828@ndsuvax.UUCP> <1989Aug12.221624.12153@utstat.uucp> <1894@ucsd.EDU> <1989Aug13.071802.5187@utzoo.uucp> <527@logicon.arpa> <9636@b-tech.ann-arbor.mi.us> <1989Aug16.182527.24840@utzoo.uucp> Sender: news@oliveb.olivetti.com Reply-To: jerry@olivey.UUCP (Jerry Aguirre) Organization: Olivetti ATC; Cupertino, Ca Lines: 49 In article <1989Aug16.182527.24840@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >done properly, and so you need a way to feed that process from multiple >sources -- this is very hard to do portably. I am beginning to seriously wonder if writing "portable" code is a good idea. (Note, no smiley attached.) There seems to be a steady stream of ideas that would be really great but are "hard to do portably". While part of the "ball of hair" that news 2.11 became was do to evolutionary modification I think that the better part of it is due to trying to maintain compatability with dozens of environments. I mean it has ifdefs for BSD, 4.2, 4.3, SysV, Pyramid, Xenix, HP, and more. As a case in point I added code to do forks instead of execs when processing batches. It worked for most environments but broke for a few people with strange STDIO libraries. More IFDEFS and other arcane modifications were added to the code. Right now I would be afraid to change any part of 2.11 news because it would certainly break in someone's environment. So, do we write for the "lowest common denominator"? Use temporary files for IPC? Worry about address space for PDP11s and small model PCs? No standard file locking? I can't see us getting clean high performance code that way. Or do we stay with a spagetti of define, ifdef, else that needs a guru or AI to configure. (Is my rindex fast?, Do I even HAVE rindex?) It isn't even always a matter of OS compatability. There are sites out there running with 10 times the CPU power and 1/20th the disk space that I have. Naturally the word "optimize" means something entirely different to them. What I am contemplating is totaly separate versions of code for the major versions of Unix. That is, someone would maintain a BSD version, someone else would maintain a SysV version, yet another an Xenix version, etc. If a bug fix or improvement can be ported from one to the other then great. Maybe some of the code, say for parsing headers and handling control messages, could be common. But lack of portability should not hold back all the versions. Of course this means extra work because more than one version would have to be maintained but there are certainly enough sites now to justify it. (What the heck, we have 3 separately maintained versions already!) On the other hand beta testing would not requre 20 carefully selected sites so the total work might actually be less. Comments? Jerry Aguirre