Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: C standard ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 46 of 89 Topic 26107 of 26821
Post > Topic >>

Re: C standard question?

by Keith Thompson <kst-u@[EMAIL PROTECTED] > May 11, 2008 at 12:00 PM

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"
 




 89 Posts in Topic:
C standard question?
jan.chludzinski@[EMAIL PR  2008-05-07 11:44:09 
Re: C standard question?
Eric Sosman <Eric.Sosm  2008-05-07 15:20:46 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-07 13:23:50 
Re: C standard question?
Jack Klein <jackklein@  2008-05-07 22:35:23 
Re: C standard question?
rlb@[EMAIL PROTECTED] (R  2008-05-16 10:41:14 
Re: C standard question?
Jack Klein <jackklein@  2008-05-07 22:44:45 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-07 21:01:48 
Re: C standard question?
CBFalconer <cbfalconer  2008-05-07 18:12:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 17:06:23 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 17:38:00 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:52:21 
Re: C standard question?
Eric Sosman <esosman@[  2008-05-10 14:00:19 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:55:04 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 18:21:24 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-10 23:55:25 
Re: C standard question?
Thad Smith <ThadSmith@  2008-05-16 21:45:09 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 10:55:49 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 19:02:58 
Re: C standard question?
Richard Heathfield <rj  2008-05-10 18:18:39 
Re: C standard question?
lawrence.jones@[EMAIL PRO  2008-05-10 14:57:28 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 12:08:27 
Re: C standard question?
Eric Sosman <esosman@[  2008-05-10 15:55:11 
Re: C standard question?
richard@[EMAIL PROTECTED]  2008-05-10 20:08:54 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-10 15:55:21 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-10 19:58:26 
Re: C standard question?
CBFalconer <cbfalconer  2008-05-10 16:49:42 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-10 19:49:54 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-10 20:23:51 
Re: C standard question?
"Joachim Schmitz&quo  2008-05-11 10:40:42 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-11 06:10:04 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 11:39:18 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-11 11:43:01 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 11:42:51 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 05:12:19 
Re: C standard question?
santosh <santosh.k83@[  2008-05-12 22:55:09 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 05:16:21 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 13:47:08 
Re: C standard question?
rlb@[EMAIL PROTECTED] (R  2008-05-13 13:43:40 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 15:04:33 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 06:05:05 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 14:23:07 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-11 14:29:36 
Re: C standard question?
David Thompson <dave.t  2008-06-04 05:49:43 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 09:10:07 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 09:17:12 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-11 12:00:20 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-11 21:06:51 
Re: C standard question?
fchang@[EMAIL PROTECTED]   2008-05-11 09:49:03 
Re: C standard question?
Ian Collins <ian-news@  2008-05-12 08:01:47 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 19:02:42 
Re: C standard question?
Eligiusz Narutowicz<el  2008-05-11 20:01:34 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-11 20:55:08 
Re: C standard question?
Eligiusz Narutowicz<el  2008-05-11 21:18:44 
Re: C standard question?
Spiros Bousbouras <spi  2008-05-11 12:27:44 
Re: C standard question?
Bart <bc@[EMAIL PROTEC  2008-05-11 13:12:45 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-11 17:21:25 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:07:52 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:10:42 
Re: C standard question?
Richard Heathfield <rj  2008-05-12 06:31:11 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 09:03:25 
Re: C standard question?
"Default User"   2008-05-12 22:29:06 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 16:01:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 07:54:10 
Re: C standard question?
=?ISO-8859-1?Q?Tom=E1s_=D  2008-05-12 02:29:08 
Re: C standard question?
Cromulent <cromulent@[  2008-05-12 10:59:35 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-12 08:58:37 
Re: C standard question?
Ben Bacarisse <ben.use  2008-05-12 18:06:47 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-12 18:53:59 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-12 18:50:14 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-12 18:51:25 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 15:14:27 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 09:04:48 
Re: C standard question?
Willem <willem@[EMAIL   2008-05-13 16:41:48 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 17:39:00 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 10:26:23 
Re: C standard question?
David Brown <david.bro  2008-05-13 23:45:00 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-13 17:57:57 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 18:27:44 
Re: C standard question?
Willem <willem@[EMAIL   2008-05-13 18:31:29 
Re: C standard question?
Keith Thompson <kst-u@  2008-05-13 12:14:27 
Re: C standard question?
Harald van =?UTF-8?b?RMSz  2008-05-13 19:33:55 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-13 19:55:25 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-13 18:10:48 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-16 12:30:58 
Re: C standard question?
Richard Heathfield <rj  2008-05-16 12:07:19 
Re: C standard question?
pete <pfiland@[EMAIL P  2008-05-16 08:37:25 
Re: C standard question?
Peter Nilsson <airia@[  2008-05-16 22:41:50 
Re: C standard question?
Flash Gordon <spam@[EM  2008-05-17 10:36:59 
Re: C standard question?
Chris H <chris@[EMAIL   2008-05-17 09:05:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 1:08:50 CDT 2008.