|
From: Ioannis V. <no...@ya...> - 2001-01-04 18:57:50
|
Do you find this kind of stuff:
drawline((struct point) {.y=2, .x=1}, (struct point) {.x=3, .y=});
int a[]={[2]=3, [1]=2, [0]=1};
enum{ first, second};
const char *nm[]={[second]="second", [first]="first",};
struct {int a[2], b}; x[]={[0].a = {1}, [1].a[0] = 2};
as missing and recommended additions, that is, there was no other way of
doing this? C's power has been for years the fact that it was small, yet
versatile enough to do anything. The only useful and needed addition was
that of restricted pointers. The rest of the "improvements" are bloated
features without providing any easier way to do things already be done. long
long type corrupts compatibility with the previous standard and C++. Aside
of C++, the previous standard considered long as the bigger integral type,
and all programs written then were asssuming long as the biggest integral
type. We could live for years without bool defined in stdbool.h . I imagine
the bool improvement is something like:
stdbool.h:
enum bool{FALSE, TRUE};
what an improvement!
All these bloated language extensions (and long long corrupting
compatibility wiith the previous C and existing C++ standards) show the
following things:
a) Most in the committee were fortran programmers or were bored to vote
negatively, or were too friendly with one another and did not want to create
bad feelings.
b) "New" C is bloated with unuseful new complementary features much like the
pascal things write, writeln...
c) Basic issues were not covered. Type safety mechanisms were not
introduced, better code management mechanisms such as C++ namespaces were
not adopted. These are better things to adopt than things from fortran.
Conclusion: No any new benefits (except of the restrict pointers and perhaps
the variable sized arrays although the second was accessible via realloc()),
and yet one has to learn a lot more things so as to be credited to say that
he knows the whole C language.
Of course this is my personal opinion which will not change facts after all.
:) Just mentioning my opinion. I think that the new standard brings much
trouble to the viability of the language.
Ioannis
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of James
> Gordon
> Sent: Thursday, January 04, 2001 6:06 PM
> To: 'dev...@li...'
> Subject: RE: [Dev-C++] The new C99 Standard
>
>
> I don't really see what the problem is. Most of it merely adds new
> functionality or allows things that developers want to do be done in the
> language rather than rolling your own.
>
> I don't think it breaks much, if anything.
>
> e.g. bool is only define if you include the header, which you
> would only do
> as part of an upgrade/re-write.
>
> If you can define variables as being sized at runtime than e.g. char
> ms[b+3]; than that's good, isn't it?
>
> The %ll etc. in snprintf is additional functionality, won't break existing
> code and might make new code easier to write.
>
> New types, no problem there?
>
> Elastic structures, well I could of used that years ago.
>
> Designators, seems good to me, creating temporary objects in the function
> call saves having an object on the stack for the lifetime of the function
> just to pass it to one function.
>
> iso646, again, doesn't break code merely help in the readability.
>
> Regards,
>
> James.
|