Richard Heathfield wrote, On 14/09/07 01:32:
Flash Gordon said:
It shouldn't actually matter, should it?
It saves accusing people of thinking something that they don't think
sometimes
There is a tendency on Usenet (and, I think, in life in general) to
divide the world into teams, such that if I agree with X about Y, then
it is assumed by (some) others that all of my opinions about Y are the
same as X's opinions about Y. But this is simply not the case, and
there is no reason why it should be.
I often deal with people where I agree with them on some things but not
on others.
I agree with Kelsey that intN_t types are completely and utterly useless
(wait, wait!).
Well, there I disagree, as I'm sure you noticed. However, as shown below
you are being civilised about it and accepting that others may have good
reasons.
I also agree with Kelsey that it's no big deal quoting
from a draft in clc.
As do I. Especially the port C99 drafts which are effectively the
current standard because they are the published standard with the TCs
applied. So modulo errors in implementing the TCs they should accurately
represent the current standard.
But I am less bullish than Kelsey about other
people using intN_t. Personally, I think it's a mistake to be led down
that path, but hey, maybe - just *maybe* - there's a real use for these
little critters that I haven't thought of, yeah? And some people whose
opinion I respect have suggested that they do in fact find these types
useful. So, even though they seem completely useless *to me*, and even
though I think they are ugly and unnecessary warts, I'm not about to
insist that they're dropped from the language. If they are useful to my
friends, let them stay, warts and all.
A perfectly reasonable attitude. Actually, I would be happy if the
signed versions did not mandate two's complement.
Fixed width types are, IMHO, the perfect types for memory mapped HW.
Since then the HW defines it being N bits wide. I was doing this before
I was on this group and learned the correct way of doing lots of things,
so the code was not as portable as I could easily make it now, but doing
anything other than relying on a 16 bit integer type would have been a
step too far in terms of the work required to implement the system. It
*could* be done, but the extra effort would not be justified by the benefit.
I also see them as useful (but not as important) for interfaces which
will be writing binary data and the specification says the data will be
exactly N bits wide (the routine actually doing the read/write still has
to handle endianness, obviously.
I can also see why a lot of people would find absolutely no use for
fixed width types.
I also think that for many uses the fast types could be even better.
IMHO a lot of the time one wants a type with a minimum range but wants
it as fast as possible. So if you want a minimum of 32 bits and as fast
as possible long is not really expressing your requirements since it
*could* be 64 bits on a 32 bit architecture.