From: "Marin David Condic, 561.796.8997, M/S 731-96" <condicma@PWFL.COM>
Subject: Re: Porting Experiences (was Ada and Pascal etc )
Date: 1997/11/06
Date: 1997-11-06T00:00:00+00:00 [thread overview]
Message-ID: <97110617504459@psavax.pwfl.com> (raw)
Lawrence Kirby <fred@GENESIS.DEMON.CO.UK> writes:
>The portability implications of this are small or non-existent (there may
>be performace implications in rare circumstances, and issues relating to
>data sizes and external data formats). As ever the C language is designed
>with the assumption that the programmer knows what he is doing. The use
>of ranges implies that you know beforehand what those ranges will be.
>In C you follow a set of rules:
>
I think you missed a very important point and one that has trashed
many attempted ports in my experience.
While the rules you cite do guarantee a minimum accuracy and
intelligent use thereof certainly does help things, what do you do
about all the representation issues? Technically, that integer you
specify as needing a minimum of 16 bits could get represented with
32 bits. Suppose that it is used in an I/O record to a data file?
Now you're incompatible with all the data files built by another
version which allocated only 16 bits. Or suppose it is passed as a
parameter to an OS routine or routine written in another language
or a routine written in C but compiled with a different compiler?
There are *many* occasions where the internal representation of a
data item is *critical* to the success of a system. Hence not
having the ability to explicitly state what sort of representation
is required can hurt portability. I don't see why C can't be
modified in some subsequent standard to let the programmer dictate
that a given number be represented a certain way, so I don't think
it is the end of the world. But as things stand now, this is a
weakness in the language that hurts portability and if something
*does* successfully port without changes, it happens more by
accident than by design.
MDC
Marin David Condic, Senior Computer Engineer Voice: 561.796.8997
Pratt & Whitney GESP, M/S 731-96, P.O.B. 109600 Fax: 561.796.4669
West Palm Beach, FL, 33410-9600 Internet: CONDICMA@PWFL.COM
===============================================================================
"Some people say a front-engine car handles best. Some people say
a rear-engine car handles best. I say a rented car handles best."
-- P. J. O'Rourke
===============================================================================
next reply other threads:[~1997-11-06 0:00 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-06 0:00 Marin David Condic, 561.796.8997, M/S 731-96 [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-11-03 0:00 Porting Experiences (was Ada and Pascal etc ) Marin David Condic, 561.796.8997, M/S 731-96
1997-11-04 0:00 ` Jerry van Dijk
1997-10-28 0:00 ADA SUCKS, C/C++/JAVA RULES!!!! John Black
1997-10-28 0:00 ` John Black
1997-10-28 0:00 ` ADA and Pascal SUCK, C,C++, and Java are the only languages you need!! John Black
1997-10-28 0:00 ` David A. Frantz
1997-10-29 0:00 ` John Black
1997-10-29 0:00 ` Mike Copeland
1997-10-31 0:00 ` Alan E & Carmel J Brain
1997-10-30 0:00 ` Jon S Anthony
1997-10-31 0:00 ` Craig Franck
1997-10-31 0:00 ` Jon S Anthony
1997-11-01 0:00 ` Porting Experiences (was Ada and Pascal etc ) Alan E & Carmel J Brain
1997-11-01 0:00 ` Jon S Anthony
1997-11-01 0:00 ` Craig Franck
1997-11-03 0:00 ` Shmuel (Seymour J.) Metz
1997-11-03 0:00 ` Kaz Kylheku
1997-11-04 0:00 ` Pat Rogers
1997-11-04 0:00 ` Kaz Kylheku
1997-11-04 0:00 ` Shmuel (Seymour J.) Metz
1997-11-04 0:00 ` Kaz Kylheku
1997-11-05 0:00 ` Shmuel (Seymour J.) Metz
1997-11-05 0:00 ` Boyd Roberts
1997-11-05 0:00 ` Craig Franck
1997-11-05 0:00 ` Shmuel (Seymour J.) Metz
1997-11-06 0:00 ` Lawrence Kirby
1997-11-07 0:00 ` Boyd Roberts
1997-11-07 0:00 ` Shmuel (Seymour J.) Metz
1997-11-07 0:00 ` Peter Seebach
1997-11-07 0:00 ` Craig Franck
1997-11-07 0:00 ` Shmuel (Seymour J.) Metz
1997-11-08 0:00 ` Craig Franck
1997-11-08 0:00 ` Kaz Kylheku
1997-11-08 0:00 ` Vesa Karvonen
1997-11-10 0:00 ` Shmuel (Seymour J.) Metz
1997-11-11 0:00 ` Craig Franck
1997-11-12 0:00 ` Shmuel (Seymour J.) Metz
1997-11-14 0:00 ` Craig Franck
1997-11-24 0:00 ` Ralph Silverman
1997-11-09 0:00 ` Dennis Weldy
1997-11-10 0:00 ` Shmuel (Seymour J.) Metz
1997-11-10 0:00 ` Dennis Weldy
1997-11-12 0:00 ` Shmuel (Seymour J.) Metz
1997-11-14 0:00 ` Robert Munck
1997-11-05 0:00 ` Samuel T. Harris
1997-11-05 0:00 ` Kaz Kylheku
1997-11-06 0:00 ` Alan E & Carmel J Brain
1997-11-06 0:00 ` Kaz Kylheku
1997-11-06 0:00 ` Paul Campbell
1997-11-07 0:00 ` Samuel T. Harris
1997-11-13 0:00 ` Steve Summit
1997-11-13 0:00 ` Samuel T. Harris
[not found] ` <63m3pt$t2d@bgtnsc02.worldnet.att.net>
1997-11-04 0:00 ` Shmuel (Seymour J.) Metz
1997-11-05 0:00 ` Craig Franck
1997-11-04 0:00 ` Lawrence Kirby
1997-11-04 0:00 ` Shmuel (Seymour J.) Metz
1997-11-04 0:00 ` Kaz Kylheku
1997-11-05 0:00 ` Chris Brand
1997-11-05 0:00 ` Lawrence Kirby
1997-11-05 0:00 ` Kaz Kylheku
1997-11-05 0:00 ` Kaz Kylheku
1997-11-05 0:00 ` Dann Corbit
1997-11-07 0:00 ` Boyd Roberts
1997-11-05 0:00 ` James Youngman
1997-11-05 0:00 ` Steve Summit
1997-11-05 0:00 ` Lawrence Kirby
1997-11-05 0:00 ` Craig Franck
1997-11-03 0:00 ` Jon S Anthony
1997-11-03 0:00 ` Alan E & Carmel J Brain
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox