C's syntax

Erik Max Francis max at alcyone.com
Wed Oct 25 00:10:53 EDT 2000


Alex Martelli wrote:

> It *IS* most definitely the language's fault if its syntax is so
> horrid that it needs specific implementations to "subset" that
> syntax, while having standards that assert the whole syntax
> must be such-and-such.

Then don't use it.  People who like C will disagree with you, however.

> Either the idiom
>     while(this_char = get_next_char())
> is a good thing to have in the language, in which case it's
> silly to state that a good compiler should strive to make its
> users avoid it; or, the idiom is a BAD thing to have in the
> language, in which case it's just as silly to keep stating that
> the language's syntax is good!

It's a good thing to have in the language, because it adds more
flexibility.  The typical way of using it is something like

    while ((c = getchar()) != EOF)
        ...

which, as any C programmer will tell you, is very convenient.  In fact
assignment in while loops is usually not suspect.  The typical way of
suppressing an assignment-or-equality warning is by separating that
expression with parentheses and doing an explicit comparison (as above),
or by simply adding a set of extra parentheses.

> ... and your insistence
> on compiler-warnings suggests that so do you, ...

No it doesn't, you are quoting me out of context.

> ... except that
> you seem unable to follow through logically and admit
> that, as *the syntax of C has horrid aspects that should
> NOT be used* (with, even, compiler-warnings pushing users
> away from them), therefore, *the syntax of C is _NOT_
> good*.

_You_ don't like C's syntax.  That does not mean that it is not good;
that just means that, in your opinion, it is not good.  Don't use C; get
over it.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Blood is the god of war's rich livery.
\__/ Christopher Marlowe
    The laws list / http://www.alcyone.com/max/physics/laws/
 Laws, rules, principles, effects, paradoxes, etc. in physics.



More information about the Python-list mailing list