Re: Size of bool unspecified: why?
On Jul 25, 5:49 am, "JBarleycorn" <jbn...@newsnet.org> wrote:
James Kanze wrote:
On Jul 22, 11:17 pm, "JBarleycorn" <jbn...@newsnet.org> wrote:
"James Kanze" <james.ka...@gmail.com> wrote in message
Who does? In over thirty years of experience in C and C++, I've
yet to see any application which uses such a header. I'm
tempted to say that someone who uses such a header doesn't
understand the basic philosophy behind C and C++.
Now we're getting somewhere! You saying that you code against a
I'm saying that I use data abstraction, as a tool to manage
No, you did not say that.
I said enough that any competent programmer would have
understood it that way.
The word "religion" will surface soon, I'm
sure. Then you can say that my designs are unholy and yours are holy
and then the congregation you belong to will ... something.
There's no religion about it
scuuze me, "philosophy", as you put it then.
It's neither philosophy nor religion. It's effective, pragmatic
: the higher the level of
Whoa, what would a C programmer like you know about that?
I'm a professional, that's all. Regardless of the language I
use (and I haven't used C in over 20 years), I write code
professionally. And you can obtain a pretty high level of
abstraction in C (even if a lot of programmers don't).
One of the first levels of abstraction is ignoring the number of
bits in an int.
the more efficient the programmer. Given a good
compiler (something rare),
Against higher levels of abstraction: it's often
more work (defining a class, where just using int will do), and
some particular interfaces (including most serialization) are
defined in terms of a low level of abstraction.
Don't argue my point! (I mean if you want to win!).
Who cares about "winning"? I'm interesting in communicating and
understanding. And in an honest presentation of the facts.
Sure there is: signed char, short, int and long are all similar
types, with potentially different widths. (Don't ask me why
bool is a signed integral type, rather than an unsigned one.)
Like I *said*: there is no *similar* type.
Except all signed integral types.
Don't mock me. I *said*, there is no similar type.
I know what you said. And you're wrong. (If you were honest,
you'd admit it, but that seems to be asking too much.)
And here I am "whining" about broken bool! But wait, it's just as bad!
bool is like throwing a dog a bone, you know he wants the steak, but
he'll knaw on that bone for...
:-) I like the image. In a lot of ways, C++ is just a bone.
The problem is that there isn't any steak, and in most cases,
the other languages I've seen are empty dishes. Or as I usually
put it: C++ is about the worst language you can imagine. Except
for all of the others.
well, till it's gone! (Good think she has
the umbrella now, cuz that "safety doposite box" is surely just worth of,
(I wouldn't be surprised if <windows.h> still has a typedef for
BOOL. Or maybe a macro.)
"To be honest", I am surprised you don't know that.
Why should I? I know that at one point in time, they did, but
it doesn't seem relevant today. I do a lot of Windows
programming, and I've never used it.