On May 11, 8:00=A0pm, Keith Thompson <ks...@[EMAIL PROTECTED]
> wrote:
> Tom=E1s =D3 h=C9ilidhe <t...@[EMAIL PROTECTED]
> writes:
> > On May 11, 1:12=A0pm, 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
=2E..
> Some of us see "char unsigned" as counterintuitive in much the same
> way.
char unsigned is nothing compared with the impossibly twisted type
declarations that don't seem to bother anyone here. Those really /are/
counterintuitive.
I see both of unsigned char/char unsigned as long-winded. All these
standard type combinations should be typedef-ed somewhere to result in
a series of short and sweet typenames that can be used throughout a
project. Then it really doesn't matter where the unsigned goes.
It's just a shame that these names are not standardised so they could
be used everywhere.
Examples:
void addstr(unsigned char *a, unsigned char *b, unsigned char *c)
void addstr(uchar *a, uchar *b, uchar *c)
void addstr(charu *a, charu *b, charu *c) /* Alternate */
To me the compact form is much more legible. Even better would be:
void addstr(uchar *a, *b, *c)
but apparently this is not allowed. (Those C99 guys could have spent
those 9 years coming up with something of genuine use and trivial to
implement.)
--
Bartc


|