|
From: Chad S. <ho...@ho...> - 2001-01-05 18:50:23
|
>From: "Ioannis Vranos" <no...@ya...>
>Reply-To: dev...@li...
>To: <dev...@li...>
>Subject: RE: [Dev-C++] The new C99 Standard
>Date: Fri, 5 Jan 2001 20:34:14 +0200
>
>:) This is my last message concerning the matter since i am starting to
>feel the anger of the others. long was the largest integer supported by the
>C89. The standard did not define a size, only the fact that
>sizeof(int)<=sizeof(long).
>
>When writing portable code on any platform, the assumption that long is the
>largest integer value supported was made. Now this has changed and the most
>code must be changed.
Wrong. No code need be changed, because they didn't change the specification
of int or long, so the assertion you made that
sizeof(int) <= sizeof(long) will still be true even will compilers following
the new standard.
>Also the need for "100" more integer types did not exist. The introduction
>of system specific integers breaks the generality of the language. It is
>system vendor's job to provide platform extensions. When i write C code i
>expect it to run unchanged from Pentium IV to PDP-11 in the local museum.
This is the point I'm trying to stress. Since no changes where made to any
existing data types there need be no changes to code that uses the existing
data types. All that C99 does is introduce new data types that allow
programmers to more specifically specify at least how large a particular int
variable should be independant of the platform. I see this as a big
advantage, because it enables me to write (for example) a bitfield which
utalizes 64 bits, and will not requre that I change the data type depending
on what platform I'm running it on. I can use the int64 (or whatever the new
spec calls it) and I am then assured that even if my software is compiled on
32 bit architecture the size of that field will still accomodate all 64
bits.
>
>E.g.. int a[]={[2]=1, [1]=0, [0]=7};
>
>which is equivallent of always existing int a[]={7,0,1};
I agree that in this particular example nothing much is gained by the new
(as you say FORTRAN-like) intitialization scheme. However, nothing was lost
either. So on that issue I don't really have any strong feelings one way or
the other. I will most likely continue to initialize my structs and arrays
according to the old standard since I'm personally more used to seeing it
that way, but I don't understand why you are so opposed to them since they
really won't affect you unless you use them. (Or work with someone who
does.)
Chad Simmons
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
|