Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!stern.fokus.gmd.de!zib-berlin.de!gs.dfn.de!uni-erlangen.de!kue!lrz-muenchen.de!informatik.tu-muenchen.de!Germany.EU.net!EU.net!peer-news.britain.eu.net!liv!news
From: Bruce Stephens <bruce@liverpool.ac.uk>
Subject: Re: Zip V8 (Re-releasing Zip)
In-Reply-To: ermbgus@at.ericsson.se's message of 24 Nov 1995 10:14:42 GMT
Message-ID: <weybt2l7r8.fsf@iasc3.scm.liv.ac.uk>
Sender: brs@iasc3.scm.liv.ac.uk
Nntp-Posting-Host: iasc3.scm.liv.ac.uk
Organization: IASC, University of Liverpool
X-Newsreader: Gnus v5.0.12
References: <490dms$ic2@bubba.NMSU.Edu> <4945ui$dcb@erinews.ericsson.se>
Date: Mon, 27 Nov 1995 09:35:55 GMT
Lines: 33

>>>>> "Bjorn" == Bjorn Gustavsson <ermbgus@at.ericsson.se> writes:

> In article ic2@bubba.NMSU.Edu, jholder@nmsu.edu (John Holder)
> writes:
>> Bruce Stephens (bruce@liverpool.ac.uk) mentioned on Tue, 21 Nov
>> 1995 09:55:00 GMT in rec.arts.int-fiction that::
>>> I'd prefer a reimplementation in C, preferably with the core of
>>> the code #ifdefless.  I
>>  Sadly, this is impossible if you want to be portable even only
>> among UNIX platforms.  At the moment, the large majority of
>> #ifdef's support portability.  And really, it's not that hard to
>> get the hang of.

> I wouldn't say it is impossible.  The implementation of Tcl (Tool
> Command Language) has a very clean interface to various variants of
> Unices, so that most of the code is mainly #ifdefless.  (BTW, the
> source code for Tcl is the best written C program I've ever seen, in
> terms of maintainbility and readability.  It is sheer joy reading
> it!)

That's the kind of example I had in mind.  Put the things that have to
be #ifdefed in header files (and use autoconf to choose them, on
machines where the configure script can run), and perhaps have a
library of standard functions which may or may not exist on particular
machines in a separate file.  I don't mind a file or two with #ifdefs,
but I find them distracting when they're all over the place, and I'd
prefer them to be minimized.  This also helps portability and
maintainability, even if you don't mind reading lots of #ifdefs.
-- 
Bruce                   Institute of Advanced Scientific Computation
bruce@liverpool.ac.uk   University of Liverpool
http://supr.scm.liv.ac.uk/~bruce/

