Book on Microsoft C
mcdonald at uxe.cso.uiuc.edu
mcdonald at uxe.cso.uiuc.edu
Thu Mar 30 01:04:00 AEST 1989
mcdonald at uxe.cso.uiuc.edu:
"Portability" is a word seldom heard outside the academic discussions
of Usenet.
gwyn at smoke.brl.mil (Doug Gwyn):
That's utter nonsense.[....]
ejd at caen.engin.umich.edu (Edward J Driscoll):
Sure, but there are also numerous developers who use all kinds of
non-portable code in order to get the best performance they can.
The majority of users probably only use a particular application
on one particular system, so they're not going to be attracted
by portability....
Fs at ernie.berkeley.edu (Jim Shankland):
Second, it's a canard that there is a direct tradeoff between portability
and performance. In most cases, the performance impact is unnoticeable,
and the (very) few cases where it makes a difference can be carefully
isolated. Learning to code portably can take a little extra programmer time
and discipline up front; even once the skill is learned, portable coding
*may* take a little extra development time. It's worth it.
Those are the facts. Flout them at your own (or your employer's) risk.
Me again:
It is silly to assume that there is no tradeoff between portability
and performance. It is true that in most cases it can be carefully
isloated. Portability things like not assuming sizeof(a) == sizeof(b),
coding in real ANSI C with full prototypes, are simply good
coding practice. And codeing in pure ANSI C guarantees a good
bit of portability ( :-( except to certain benighted systems with
only old-fashioned compilers.).
But, doing certain things portably can cost dearly. Graphics is
one area. Not using the full functionality of a machine's
special features is another. I was, and am, talking not so much
about the "core" functionality of a program as I am about
the user interface. And, I must emphasize most emphatically,
that a portable user interface MUST either be machine-specific
or be crippled by using the lowest common denominator (i.e.
a tty emulator text interface.) People who think that they can
get away with a (codewise) portable user interface are either
deluded or working in a sheltered market segment (accounting
programs for cookie shops?)
Doug McDonald
More information about the Comp.lang.c
mailing list