jaysome said:
So what you're saying is that C1999--I mean C99--was totally useless
(at least in this instance) in your point of view? If so, I tend to
agree.
Certainly in this instance, yes. The absence of a return statement from
main makes the program very, very marginally easier to write, at the
expense of being very marginally harder to read. The cost is N * delta
(where N is the number of times the code will be read), and the saving
is a mere 1 * epsilon. The game is not worth the candle.
Windows Vista, and even Windows XP, has a "Rollback driver" option. Is
there anything similar with respect to ISO/ANSI standards in general,
and the ISO/ANSI C99 standard in specific?
Not as far as I'm aware, at least not officially. In practice, that's
what implementors have actually done, for the most part.
I'd be willing to bet that most regulars in this newsgroup wouldn't
hesitate to click on a button labeled "Rollback Standard Version" when
it comes to C.
Here's what I'd have liked C99 to be:
X removal of K&R-style function definitions
X removal of gets
X removal of unadorned %s from *scanf
X #ifntypedef (but at least I understand why I can't have it)
X function without return statement not permitted except where return
type is void
X no changes may invade the user's identifier namespace
X no new headers
X operators for integer power and powmod
X (limited) support for operator overloading
perhaps as some kind of
preprocessor step:
e.g. #overload +(bignum b1, bignum2) bignum_add(&b1, &b2)
X a C equivalent of STL - that is, a standard set of routines for
manipulating dynamic strings, arrays, maps, and so on
* removal of implicit int
* compound literals
* support for complex types
* %zu for size_t in printf
* variable argument macros
* trailing comma allowed in enum
* snprintf and vsnprintf
* inline functions
* return without expression not permitted in function that returns a
value (and vice versa)
....and NOTHING ELSE.
Some of these changes are trivial, of course. Others are rather more
wide-ranging, but those are also the ones that I think would have been
most useful to most people. If the effort that had gone into codifying
97,000 pages of mostly useless mathematical features had instead gone
into some of these features, I think we'd have a more dynamic, vibrant
language - and one which implementors just *might* have taken the
trouble to implement.