C's syntax

Alex Martelli aleaxit at yahoo.com
Tue Oct 24 16:05:16 EDT 2000


"Erik Max Francis" <max at alcyone.com> wrote in message
news:39F5B3AC.7A02F667 at alcyone.com...
> Alex Martelli wrote:
>
> > Koenig wrote his landmark book with about a decade's worth of C
> > experience (one could hardly have more back then, since that was
> > about the language's age inside Bell Labs:-), and he disagreed
> > with you, recommending the "if(0==a)" idiom.  And why not?
>
> It is a stylistic issue, and so is always a point of contention.  Even f
> you find yourself making the = vs. == errors, a good compiler will warn
> you.  If you're not using a good compiler, that's not the language's
> fault.

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.

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!

I opine towards the second choice -- and your insistence
on compiler-warnings suggests that so do you, 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*.  The definition of "a GOOD syntax" is *NOT* "one
such that some key aspects of it should never be used"...
get it?-)


Alex






More information about the Python-list mailing list