FidoNet Echomail Archive

<<< Previous Index Next >>>

From: George White
To: Bj”rn Felten
Date: 2004-08-07 08:59:32
Subject: [C] Code File Structure

Hi Bj”rn,

On 02-Aug-04, Bj”rn Felten wrote to George White:

 GW>> There is _no_ perfect way, it is a personal choice!

 BF> Wouldn't it be nice if it at least there was a preferred way? :)

"C" is used for so many different tasks that even a preferred way is
difficult to agree :-(.

 BF> One thing I miss in C is the way Pascal can extract only the parts
 BF> that's needed. In Pascal I have just a few units with all my
 BF> extras. E.g. when I program fidonet related stuff, I simply add
 BF> the unit fidonet and instantly have access to hundreds of
 BF> functions, procedures, structures &c. If I use only a few, those
 BF> are the only ones compiled into the finished binary, so there's no
 BF> overhead to worry about

 BF> I still haven't found any C compiler that can do this, do you know
 BF> if there's anyone available

You've got several answers pointing out that the "C" way is via a
library. There is a good reason for this! When "C" was devised
computers were both slow and memory constrained, and had (except for
_really_ expensive - 1,000s of dollars) no long term fast storage
available. Source code data was all on decks of cards (that's why
classic FORTRAN has a "line number" at the start of each line, so that
if you dropped the deck you could run it through a card sorter and get
it back in order) or paper tape. The paper tape was read at ASR speed
(110 cps) so the concept of multiple passes and all else needed for
the sort of approach you use with Pascal was not an option then. Once
the "C" library system was in place there was (and still is) no good
reason to change it because it offers no advantages over the existing
technique, it's just a different way of achieving the same end.

To put things in perspective, 20 or so years ago I was developing
systems for car park control that ran on a Cromemco Z80 based system
with 1 or 2 extra 64k memory cards (set up as 3 or 5 banks of memory).
To rebuild a system from scratch (source files) took a working day
using multiple floppy disks...
I can build the current PC based software to do the same and much,
much more in 5 minutes on this K6/2-500 system, and not much longer on
the P100 system next door (a caching HD controller on that system
speeds it up <g>)


--- Terminate 5.00/Pro 
 * Origin: George's Country Point (2:250/501.3)
SEEN-BY: 633/267 270
@PATH: 250/501 140/1 106/2000 633/267

<<< Previous Index Next >>>