Tomás Ó hÉilidhe <toe@[EMAIL PROTECTED]
> writes:
> On May 11, 1:12 pm, Spiros Bousbouras <spi...@[EMAIL PROTECTED]
> wrote:
>
>> Anyway I believe that "char unsigned" is harmless
>> and does not warrant an inflammatory and potentially
>> offensive comment as "ridiculous". Especially if it's
>> the only comment in the post.
>
>
> Thanks Spiros, at least one person other than myself understands the
> implications of labelling someone else's way of programming as
> ridiculous, especially when the differing way makes negligible impact
> on the code, and zero impact on the assembler produced.
>
> Keith Thompson and Jack Klein have so far used the word "ridiculous".
> Jack Klein has been hostile, arrogrant and caustic toward me already,
> so I din't think there's much point in discussing him. As for Keith,
> well he tends to be courteous mainly but then he seems to drop the
> ball by going and calling other people's code "ridiculous" for no good
> reason.
I said that I find it ridiculous for a very simple reason: I do in
fact find it ridiculous. That's a personal esthetic judgement,
nothing more, nothing less. It was directed at the use of "char
unsigned", not at you personally.
Perhaps a better would for it is "counterintuitive".
I'll note that at least one person in this discussion, a member of the
C standard committee, was surprised to discover that "char unsigned"
is even legal, and that compilers will allow it.
Source code exists for two purposes. One is to be fed to a compiler
and translated into machine code (or something similar). For that
purpose, "unsigned char" and "char unsigned" are absolutely
equivalent, assuming a non-buggy compiler. The other purpose is to be
read by humans. We've seen in this thread that, for some humans,
"char unsigned" really is more difficult to read than the much more
common "unsigned char".
Consider this simple C program:
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
printf("argc = %d\n", argc);
for (i = 0; i < argc; i ++) {
printf("argv[%d] = \"%s\"\n", i, argv[i]);
if (i > 0 && argv[i][0] == '-') {
printf(" This appears to be an option specifier\n");
}
}
return 0;
}
Now consider a hypothetical C programmer who insists on indenting
backwards:
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
printf("argc = %d\n", argc);
for (i = 0; i < argc; i ++) {
printf("argv[%d] = \"%s\"\n", i, argv[i]);
if (i > 0 && argv[i][0] == '-') {
printf(" This appears to be an option specifier\n");
}
}
return 0;
}
I would call that "ridiculous", or at least "counterintuitive", and I
suspect you would as well.
Some of us see "char unsigned" as counterintuitive in much the same
way.
Your refusal to acknowledge that different people have different
intuititve ideas of what's clear and what isn't is a large part of
what's led to this flamefest. That, and the fact that you throw
around accusations of mental retardation, which is in extremely poor
taste.
> As for the the whole "char unsigned" versus "unsigned char" thing,
> well I don't care to debate in anymore but it's such a ridiculously
> stupid thing in my head. The very fact that Mr Klein even brought up
> the issue makes me wonder what's going thru his head: I mean either
> he's deliberatley being a prick (which I do suspect), or he actually
> has some sort of mental difficulty in coming to terms with a simple re-
> ordering of words.
Or he understands "char unsigned" perfectly well, but strongly
dislikes it. Why do you refuse to admit that possibility?
> Describing the re-ordering of words in "char unsigned" versus
> "unsigned char" as trivial is an under-statement. I mean, really, I
> can't think of anything more simple. It's even more simple than "++i
> versus i++".
>
> And given that it's such a stupidly ridiculous thing to even be
> debating, I couldn't be bothered listening to incompetants tell me how
> they have a stroke when their brain sees "char unsigned" instead of
> "unsigned char". If anything your brain could do with the exercise in
> variety.
The same argument could be used to defend the reverse indentation
example above.
--
Keith Thompson (The_Other_Keith) <kst-u@[EMAIL PROTECTED]
>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


|