MCENANEY WILLIAM J wrote:
> 
> Hi Friends,
> 
> I'm back.  What's that I hear, a groan?  Grin.  Since "nice" is a vague word,
> I don't know what is nice about "!strcmp()."  But if we're talking about
> readability and aesthetic appeal, I would love to change C.  Call me a nit-
> picker.  But if I wanted to find out whether two strings were identical, I'd
> want to use an equal sign in my "if" statement.
> 
> Say I need to keep using strcmp().  Then I might define constants to stand
> for values that strcmp() returns.  I could write:
> 
>         if (strcmp(s1, s2) == SAME)
>           puts ("They're the same.");
>         else
>           puts ("They differ.");
> 
> I'm no expert in C, but I'm a perfectionist about readability.  Though my
> idea me not please an expert C programmer, it tells my readers what I mean.
> What do you think?
> 
> Best wishes,
> Bill

HA, if C lent itself to readability then the * for pointer stuff would not be
used like it is.

I'd like to see a C like this:

ptr int this-is-a-pointer-to-an-int ;

ptr char char-pointer ;

It is kind of backwards trying to define a pointer variable name in terms of
what it points to:

int *this-is-a-pointer-to-an-int ;

This is saying that the variable, whose type *really* isn't explicitly stated,
"this-is-a-pointer-to-an-int" when dereferenced gives you an int, so thus by
inference, this-is-a-pointer-to-an-int *must* be a pointer to an int. Now that
is BACKWARDS IMHO!

And NO, C++, and Java are *not* the answer!

We just need to come up with a C-2, "C the next generation" language.

That's my 2c,

Brock

-- 
/---------------------------/--------------------------------------------------\
| R. Brock Lynn           /  http://www.linux.org/  http://www.rbl.dyn.ml.org/ |
| [EMAIL PROTECTED]   /         Linux: The Choice of a GNU Generation!       |
\---------------------/--------------------------------------------------------/

Reply via email to