Re: Portability



On Sun, 06 Apr 2008 21:14:51 +0200, jacob navia <jacob@xxxxxxxxxx>
wrote in comp.lang.c:

One of the holy cows here is this "portability" stuff.

Yes, it is extremely important to me.

In practice, portability means:

1) Use the least common denominator of all the supported
systems.

No, not necessarily true.

2) Between usability / good user experience and portability
always choose portability since this minimizes programming
effort

Complete and utter rubbish, and no regulars here that I can think of
promote portability over usability.

This leads to mediocre software that runs anywhere but that nobody uses
because it is just that: MEDIOCRE.

Absolutely not. Most of the C software that I write for a living
executes in embedded systems. Most of these are safety critical. Most
of these have exacting real time requirements. More than half are
both safety critical and have real time requirements.

I guarantee you, when the safety of a human being is my
responsibility, I do not deliver mediocre code.

GUIS?

Non portable

You are so blinded by your own desk top chauvinism and preconceived
notions, that you do not realize that GUIs are not important, and even
nonexistent, in most of the C code written professionally today.

Network?

Non portable.

Again, your prejudices blind you to the fact that networking is
another one of those things that is completely irrelevant to most
professionally written C code today.

This obsession with portability as the *only* way to measure software
has been carried out into this group by the "requirement" to the gcc
compiler:

gcc -Wall -ansic -pedantic

Obviously std=c99 is "not portable" as Mr Thompson never fails to
remind us when somebody recommends using standard C.

I take exception at this nonsense. Portability is fine if it doesn't
cost, or if its cost is minimal.

My priorities are different

Your priorities are wrong, that's all.

You are still fighting the long-lost battle that C should be
competitive as a language for large scale applications with extensive
user interfaces in today's complex environments.

C was not designed or created for this purpose. It was designed as a
system programming language, for writing operating system kernels and
small utilities.

Others used it to more elaborate purposes in the days when there were
few better choices. Today there are many languages far more suited to
making Windows or OS-X or *NIX GUI applications. Anyone with any
sense will use a better-suited language than C for these purposes.

The best uses of C are what they have always been, namely small
utilities and compact, highly efficient code that lives in
free-standing environments. Not only the free-standing environment of
an operating system kernel, as originally intended, but far more
importantly in the free-standing environments of literally billions of
embedded systems manufactured each year.

And of course, efficient utilities of various kinds.

1) Correct software, few bugs

Correct software can be written in any language.

2) Good user interface, good performance.

Many of the platforms running C today have no user interface, or
perhaps a few push buttons and LEDs.

3) Small software, avoiding bloat

Your compiler produces code that requires 10's to 100's of megabytes
of complex operating system to run on. Your software is the least of
it. How much less memory is required is a computer to run:

Windows Vista and your highly tight executable...

....as compared to:

Windows Vista and an executable 1 MB larger produced by another
compiler?

4) Portability

You are deluding yourself into thinking that C is important as a
language for large applications on Windows or *NIX or OS-X, when in
fact it is not. No matter how much you want it to be. Nor will it
become such again in the future. Those days are past.

Right now, far more professional programmers are writing C for
embedded systems than they are for all the desk top platforms.

At any give moment, there are orders of magnitude more embedded
systems executing C code than there are C executables running on desk
tops.

I expect no more results from attempting to have a rational discussion
with you that have resulted in the past. Most likely I will killfile
you again soon.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
.



Relevant Pages

  • Re: C, really portable?
    ... > Wait, is Java a modern language superior to C, or is it still ... It is a much better OO language than C++, ... It depends what you are doing, Java aims for rigorous portability - the same ... regardless of platform. ...
    (comp.lang.c)
  • Re: "Foreign" programmers thoughts on American politics?
    ... of course C programs can be written in such a way as to make portability ... just as in any other language. ... hit a culture not only of competence but in some cases real expertise, ...
    (comp.programming)
  • Re: "Foreign" programmers thoughts on American politics?
    ... of course C programs can be written in such a way as to make portability ... just as in any other language. ... computer science and the general culture an ignorance which is you now ... hit a culture not only of competence but in some cases real expertise, ...
    (comp.programming)
  • Re: "Foreign" programmers thoughts on American politics?
    ... of course C programs can be written in such a way as to make portability ... just as in any other language. ... computer science and the general culture an ignorance which is you now ... hit a culture not only of competence but in some cases real expertise, ...
    (comp.programming)
  • Re: C, really portable?
    ... If what you said was true then "portability cost" would be ... source code's portability is always taken against the set of platforms ... Because that's the nature of the language itself. ... is then used to bootstrap a small C compiler, ...
    (comp.lang.c)