Richard Heathfield a écrit :
True, C99 didn't really advance the language that much, but it has some
good points. Anyway, if we are going to stick to standard C, let's agree
that standard C is Standard C as defined by the standards comitee.
// comments? More sugar. VLAs? More sugar.
And what do you have against sugar?
You drink your coffee without it?
If the coffee is really excellent then the answer is simply: yes.
I mean, C is just syntatic sugar for assembly language. Why
not program in assembly then?
That is because jacob Navia is too dumb to understund why there is a
standard and what standard conforming programming really means.
Mixed declarations are a progress in the sense that they put the
declaration nearer the usage of the variable, what makes reading
the code much easier, specially in big functions.
True, big functions are surely not a bright idea, but they happen
Really? May be, but written only by idiots who have no idea of program
design.
I accept that this is not a revolution, or a really big progress in C
but it is a small step, what is not bad.
VLAs are a more substantial step since it allows to allocate precisely
the memory the program needs without having to over-allocate or risk
under allocating arrays.
Jacob Navia should learn how program design works in contrast to
blindly hack around. In 30 years programming in C I've never had a
need for VLAs even as in most of the programs I've written most of the
data I had to handle was in unknown size from some KB up to some
hundret MB in size. In any case an array was always worst case and to
avoid by design.
Under C89 you have to either:
1) allocate memory with malloc
2) Decide a maximum size and declare a local array of that size.
What will you say? When you knows how malloc work then it is the best
solution to get data handled when you need semirandom access. When you
have linear access you does not even need an single array.
Learn how to design a program right and you have no problem to handle
some GB on data - even with only some KB memory available. True is you
must be a real programmer, not a braindead hacker to get it right.
Both solutions aren't specially good. The first one implies using malloc
with all associated hassle, and the second risks allocating not enough
memory. C99 allows you to precisely allocate what you need and no more.
Bullshit, pure bullshit that shows only that Jacob Navia is unable to
program right.
In no ways will an VLA able to get thing right you have to handle
reals mass data at once.
Learn to handle malloc(), realloc() and free right, learn which of the
endless long list of tree types helps you to get your data handy by
using a minimum of memory by minimising the time to access it for your
needs.
They do come handy, but again, they are not such a huge progress.
Maybe, maybe not, I have no data concerning this. In any case it
promotes portability (yes, I am not that stupid!
since it
defines a common interface for many math functions. Besides the control
you get from the abstracted FPU is very fine tuned.
You can portably set the rounding mode, for instance, and many other
things. In this sense the math library is quite a big step from C99.
That is a progress too, but (I do not know why) we never discuss them
in this group.
Why should we? This group is for standard C, not for a single specific
CPU or FPU. There are more different and incompatible FPUs as the twit
Jacob navia will ever drem of. Standard C will help you simply to hide
the internals and a halfways good compiler will give you the best that
is possible on each of them.
Maybe what frustrates me is that all this talk about "Stay in C89, C99
is not portable" is that it has taken me years of effort to implement
(and not all of it) C99 and that not even in this group, where we should
promote standard C C99 is accepted as what it is, the current standard.
Stop spamming for your crap. There are reasons enough to stay on C89.
They are named too often here to repeat them again.
Here in this group is nobody who forces you not to use a C99 compiler
when you have one who is 100% compilant for all the environments you
needs to program for.
I mean, each one of us has a picture of what C "should be". But if we
are going to get into *some* kind of consensus it must be the published
standard of the language, whether we like it or not.
Why is Jacob Navia unable to follow his own words? I'm able to write
100% conforming C89 programs as proven already but I would be unable
to to so for C99 because there is no compiler available for all
different environments I have to write for. So I'm bounded to C89.
For instance the fact that main() returns zero even if the programmer
doesn't specify it I find that an abomination. But I implemented that
because it is the standard even if I do not like it at all.
Boah, ey! That will at least not help to trust it because its
developer is proven as twit already.
--
Tschau/Bye
Herbert
Visit
http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!