Clearly, it is too late to fix c99 - C is dead

Q

QuantumG

Back said:
Agreed. gcc is a C compiler for different platforms.
VC++ is a C/C++ compiler for Windows.
SCC is a C compiler for Cray machine.
Ch is an embeddable C interpreter for different platforms.
They use different names and have different extensions to C.
However, they all conform to the ISO C90 standard.
I think they will conform to C99 eventually.


In reply to a rant I posted on comp.lang.c. The point of my rant was
that a large majority of existing compilers should have conformed with
a large percentage of C99 back in '99. The purpose of releasing a
standard is to codify existing practice. So when C99 was released it
should have taken a few weeks for the majority of existing compilers
to be tweaked to conform. That wasn't the case. The committee didn't
codify existing practice, they made up a new language and they
released it as a standard.

It is now 2004, almost 5 years since the release of C99. One of the
most popular C compilers in the world, GCC, has yet to implement the
standard (see http://gcc.gnu.org/c99status.html) and they never will.
How can I say this with such certainty? In fact, I'll say more:
no-one intends to ever implement the standard. If you look at what
Fergus Henderson said when refering to a test program written by Tony
Finch which exercises GCC's implementation of variable length structs
you can appreciate the problem:
I think this is a defect in C99. C99 does not match existing practice
here. I note that Sun C, Compaq C, and GNU C all use the same layout
for this struct. This layout is more efficient (uses less space) than
the layout mandated by C99. I don't think the committee intended to
force implementations to be inefficient in this way and I don't think
the committee intended to force implementations to break binary
compatibility with previous releases.

- http://gcc.gnu.org/ml/gcc/2002-05/msg02858.html

GCC still produces the output Tony Finch discovered back in 2002, as
do the other compilers Fergus Henderson mentioned. I don't doubt
there is a compiler somewhere that implements this part of the
standard correctly but the existing practice of a vast majority of C
compilers is to ignore the standard and, as this is the only standard
we have, I believe that to be the death kneel of the language.

Trent Waddington
 
M

Merrill & Michele

In order to kill C, you would antecendently have to kill me, which is not so
easily done. If c99 falls flat, there will be a c2006 oder something
similar. Lack of standards makes everyone pull their hair out. It borders
on language-bashing for me to ask: if not C, then what? MPJ
 
S

Spacen Jasset

There is nothing in the C99 standard that I find especially appealing or,
how shall I put it, a required to use C99. I'll be using C89 for the
forseeable future. C99 atempts to help with internationalisation, but the
fact is to write portable, internationalised programs one still has to make
ones own way, and not rely on the compiler system to support anything since
it doesn't have to provide for any UTF encodings or anything particularly,
concretely, useful.

These are only my musings; they may change, but I doubt it.
 
D

Derrick Coetzee

QuantumG said:
In reply to a rant I posted on comp.lang.c. The point of my rant was
that a large majority of existing compilers should have conformed with
a large percentage of C99 back in '99. The purpose of releasing a
standard is to codify existing practice. So when C99 was released it
should have taken a few weeks for the majority of existing compilers
to be tweaked to conform. That wasn't the case. The committee didn't
codify existing practice, they made up a new language and they
released it as a standard.

ANSI C did make some significant changes. I think part of it also has to
do with demand. In 1990, C was pretty much *the* main language in
industry, and so people cared about it a lot more. Now Java, C++, Visual
Basic, and others are (each!) more prevalent. If any of them changed
significantly, I think its changes would be picked up more quickly by
compilers and developers alike (this may have already happened with
VB6->VB.NET).
 
Q

QuantumG

Derrick Coetzee said:
ANSI C did make some significant changes. I think part of it also has to
do with demand. In 1990, C was pretty much *the* main language in
industry, and so people cared about it a lot more. Now Java, C++, Visual
Basic, and others are (each!) more prevalent.

I believe each of these languages are now more prevalent because the
greatest strength of C - standardization - was deliberately sabotaged
by an uncaring, unthinking committee that exceeded its charter. The
results were easy to predict, and now, 5 years later, have come to
pass exactly as predicted.
 
J

Joe Wright

QuantumG said:
I believe each of these languages are now more prevalent because the
greatest strength of C - standardization - was deliberately sabotaged
by an uncaring, unthinking committee that exceeded its charter. The
results were easy to predict, and now, 5 years later, have come to
pass exactly as predicted.

I don't think so. There are certain kinds of programs that ought to
be written in C. Neither Java nor Visual Basic are alternatives for
these programs. Some will claim that C++ is 'a better C' and can be
used in its place. There is not broad agreement on this point.

C lives.
 
M

Mike Wahler

ANSI C did make some significant changes. I think part of it also has to
do with demand. In 1990, C was pretty much *the* main language in
industry, and so people cared about it a lot more.

Now Java, C++, Visual
Basic, and others are (each!) more prevalent.

Your computing sphere is very limited if you believe that.

-Mike
 
C

Chris Barts

ANSI C did make some significant changes. I think part of it also has to
do with demand. In 1990, C was pretty much *the* main language in
industry, and so people cared about it a lot more. Now Java, C++, Visual
Basic, and others are (each!) more prevalent. If any of them changed
significantly, I think its changes would be picked up more quickly by
compilers and developers alike (this may have already happened with
VB6->VB.NET).

This is really, really narrow of you. C, Java, and Visual Basic all have
their own, usually mutually-exclusive, problem domains. Using a C program
when you should be programming in VB is pretty damned stupid, and
vice-versa. Anyone who would say the above probably has only programmed in
one environment, making one kind of program in one language. If, indeed,
you have programmed at all.

C is still the only real language for OS development and other standalone
environments. C has displaced assembly and a lot of other languages like
Forth in that domain, and it shows precisely no signs of going anyplace.

In the Unix world, C is the dominant programming language for userland
applications as well. Even though gcc (the dominant compiler in that
realm) offers full and efficient C++ support, object-oriented code simply
has not caught on in that realm outside some notable exceptions.

There is plenty of legacy code written in C. This is why compilers usually
support pre-Standard constructs, and it is why languages that look like C
(and, to some extent, act like C) thrive, while Fortran and Cobol and Lisp
descendants have failed. There's nothing to suggest that C is becoming any
less relevant with time.
 
B

beliavsky

Chris Barts said:
There is plenty of legacy code written in C. This is why compilers usually
support pre-Standard constructs, and it is why languages that look like C
(and, to some extent, act like C) thrive, while Fortran and Cobol and Lisp
descendants have failed. There's nothing to suggest that C is becoming any
less relevant with time.

I think the statement "Fortran has failed" is wrong. Many scientists
and engineers still consider it the best tool for getting their work
done. Enough people are writing code in Fortran 95 to support about 10
compiler vendors (see
http://www.dmoz.org/Computers/Programming/Languages/Fortran/Compilers/
). There is a general trend towards using higher-level languages, and
Fortran is a higher-level language than either C or C++ for numerical
work, especially involving multidimensional arrays.

The Fortran 2003 standard was ratified a few weeks ago, and its new
features include OOP with inheritance, interoperability with C, IEEE
arithmetic, and stream I/O. Already some F95 compilers have added some
of these features.
 
D

Dan Pop

In said:
Now Java, C++, Visual Basic, and others are (each!) more prevalent.

Do you have some hard data to back up this statement? Whenever I look at
some open source project, I see C source code. Exceptionally Fortran or
C++.

Dan
 
K

Kenny McCormack

Do you have some hard data to back up this statement? Whenever I look at
some open source project, I see C source code. Exceptionally Fortran or
C++.

It just depends on where you look.

When I look at code written in the real world, for pay, to solve (badly)
real world problems, I see VB (and/or other MS abominations) code.
 
M

Michael Mair

Now Java, C++, Visual Basic, and others are (each!) more prevalent.
It just depends on where you look.

When I look at code written in the real world, for pay, to solve (badly)
real world problems, I see VB (and/or other MS abominations) code.

And if you look at small-scale implementations of numerical or other
algorithms, every one is well advised to do that in Matlab as the
development time in my experience is shorter than with many other
languages.

<OT rant>
If the language serves the purpose, then it is okay to use it.
The thing I find objectionable is that a too large part of the
"programmers" using (for example) VB do not really want to think,
let alone learn to write programs in the Right Way for their
language/platform, thinking they are the king when they put together
a GUI and write some action routines called at mouseclick or the
like. I do not want to ascribe this to the language, even though
some languages, C among them, force you to learn using the grey stuff
between your ears. I just get very annoyed when interviewing someone
for a job who is not even aware that he/she cannot do serious,
reliable programming but think the world of themselves...
</OT rant>

As long as I think that my students benefit more from learning C
and doing things seemingly unnecessary complicated from scratch,
I will continue to teach them C (including C99 basics). I guess that
this will be for more years than I probably will teach anyone for the
same reason why learning maths and proving some basic stuff does a
world more of good than obtaining a top-of-the-line scientific
calculator.


-- Michael
 
D

Dan Pop

In said:
It just depends on where you look.

When I look at code written in the real world, for pay, to solve (badly)
real world problems, I see VB (and/or other MS abominations) code.

When I do this kind of exercise, I usually see either badly written
C code or badly written C code using a few C++ features. In my segment
of the real world, Windows is seldom used a programming platform: it's
far too inadequate for this kind of usage.

Dan
 
A

Alan Balmer

In reply to a rant I posted on comp.lang.c. The point of my rant was
that a large majority of existing compilers should have conformed with
a large percentage of C99 back in '99. The purpose of releasing a
standard is to codify existing practice.

That's an incorrect assumption very early in your argument.
 
M

Mike Wahler

Chris Barts <[email protected]> wrote in message

I think the statement "Fortran has failed" is wrong.


Yes it's wrong. But Chris did not make that statement. He stated:
"Fortran and Cobol and Lisp descendants have failed."

Whether this is true or not I have no idea, especially when
'failed' is a subjective issue.

-Mike
 
M

Mike Wahler

Kenny McCormack said:
It just depends on where you look.

Yes. But it seems that you 'look' with a very narrow view.
When I look at code written in the real world, for pay, to solve (badly)
real world problems, I see VB (and/or other MS abominations) code.

Your 'real world' must be very small then. PC's running Microsoft
Windows (or any other OS) are a tiny minority of computer systems
in existence.

-Mike
 
M

Mark McIntyre

Do you have some hard data to back up this statement? Whenever I look at
some open source project, I see C source code. Exceptionally Fortran or
C++.

It just depends on where you look.[/QUOTE]

This is true.
When I look at code written in the real world, for pay, to solve (badly)
real world problems, I see VB (and/or other MS abominations) code.

whereas, in perhaps a more real-world situation than you can imagine, I see
C, C++, C#, Java, VB, VB.Net, Python and a heck of a lot of scripting
languages. Each being used where its most appropriate.

Only anidiot uses VB to write processor intensive libraries or code that
you need to have accessible on Solaris, Redhat and WinXP. Similarly only a
masochist uses C to write a WinXP GUI app.
 
K

Kenny McCormack

Mark McIntyre said:
whereas, in perhaps a more real-world situation than you can imagine, I see
C, C++, C#, Java, VB, VB.Net, Python and a heck of a lot of scripting
languages. Each being used where its most appropriate.

I stand by my original assertion - whatever it was - but it's not worth
arguing about. I think I made it clear that my ego is not in this.
Only anidiot uses VB to write processor intensive libraries or code that
you need to have accessible on Solaris, Redhat and WinXP. Similarly only a
masochist uses C to write a WinXP GUI app.

So true. But there's a f*** lot of idiots in the world, and more than your
fair share of masochists.
 
K

Kenny McCormack

Mike Wahler said:
Your 'real world' must be very small then. PC's running Microsoft
Windows (or any other OS) are a tiny minority of computer systems
in existence.

You sure about that? As I've tried to make clear, my ego's no in this, but
I'm pretty sure that, counting boxes or counting CPUs, IBM compatible PCs
(including all the server boxes which are really just overgrown PCs)
running on x86 chips make up a substantial percentage of the total number
of boxes in the world. I wouldn't be surprised if it was at least 60%.

Now, if you want to do it by computing power - megaflops or whatever - you
might have a defensible position.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Is C99 C? 46
C99 is widely used! 27
C99 integer types 24
C99 portability challenge 65
floating point in c99 7
Compilers c c++ 3
"Homemade" C99 prototype? 7
Problematic complex notation in C99 22

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top