C's syntax (was Re: Python Formatted C Converter (PfCC))

Alex Martelli aleaxit at yahoo.com
Tue Oct 24 15:55:18 EDT 2000


"Erik Max Francis" <max at alcyone.com> wrote in message
news:39F5B404.B5626FB7 at alcyone.com...
> Alex Martelli wrote:
>
> > Bingo.  Very good word-choice.  C manages to be effective DESPITE
> > its "tortured" syntax, *because* syntax, fortunately, is _not_ as
    [snip]
> People who like C don't think that C's syntax is "tortured."  People who
> don't like C think that it is.  It's a religious war.

No.  I like C (within the spectrum of languages at its semantic
level) _despite_ its horrid syntax (which I detested from the
very first day I tried it, back in 1982 I believe), because I
have always considered syntax to be a rather minor aspect of
a language, and C got many things just right _for its chosen
semantic level, within the abilities of machines at the time_
(in sharp contrast with languages which tried to cover too
wide a field, or asked more of hardware and compilers that
they could actually deliver at the time, etc).  The ANSI and
ISO standards made it substantially better, too (although not
by nearly enough to make its syntax non-tortured:-).

It's therefore pretty silly to lump me into a class of "people
who don't like C".  I do believe C++ is "a better C than C",
today, but that is most definitely NOT because of "syntax"
improvements (indeed, by keeping 99% C compatibility
while adding stuff, C++ can only further worsen the syntax
issue).  I've taught C to the staff of research institutions
(both academic and industrial research outfits), to the
technical personnel of software houses, and, "pro bono",
in free continuing-education evening courses sponsored by
local agencies.  I've personally written and maintained
hundreds of thousands of lines of C (and C-ish C++) code
over a span of almost two decades.  I've consulted over
the fine points of C coding, & C-oriented low-level design;
I have code-inspected and debugged C code written by
dozens of excellent programmers, as one of my roles has
been that of "last-ditch resource" for my employer -- I
get called in to help find problems that are proving too
hard for everybody else.  And I've often been very active
on usenet on C and C++ groups, as I now am here.

So what distinguishes me from the run-of-the-mill C
lover, who swoons over such "beauties" as, say:
extern int (*)(int, int*) setcallback(int, int*, int(*)(int,int*));
...?-)  Apart from the fact that I probably have 2 or 3
times his or her applicable experience...?-)

I think it is, basically, that *I don't wear blinkers*.  Wide
and pervasive as my C-and-derivatives experience may
have been, I've _always_ kept looking at other languages,
particularly at ones very different from the ones I was
using most regularly and seriously.  It IS part of my job,
after all -- advising top mgmt on how the technology winds
are shifting, and giving it my input on what specific
technologies (e.g., programming languages) our firm
should be pursuing, which ones it should be eschewing.
Besides, even if it _wasn't_ part of my job (as, at some
times, it has not been), it would still be a powerful hobby
of mine, anyway:-).

Today, I _still_ have to tell my management that, _for
low-level jobs_, C and its derivatives are what we should
keep using for the foreseeable future; at this point, like
most other software firms, we have such a huge investment
in training, know-how, and tools related to these languages
(besides, of course, zillions of line of existing code), that
"retooling and retraining" would be justifiable only by a
hypothetical *major* productivity advantage -- nothing as
silly as syntax-sugar issues is going to matter. (Fortunately,
the emergence of component-oriented development means
we're obviously not stuck with but one language for every
task, but that's another issue:-).

But that doesn't mean I have to keep silent when somebody
baldly asserts that C's syntax is "pretty good".  Yecch.  It's
most definitely *NOT*!  And trying to classify me as "does
not like C" because I *detest* its syntax is just silly.


You may, if you wish, amend your assertion to something
like "people who don't like C's syntax don't like C's syntax",
which, although rather low in informatory content, will at
least be hard to gainsay.  Just as long as you don't try to
pass this tautology off as somehow implying that those of
us who loathe C syntax don't have a perfect grasp of every
aspect of the language, a lot of relevant experience, AND
opinions based on exactly that experience and knowledge
(as well as knowledge and experience about _other_ syntax
possibilities)...


Alex






More information about the Python-list mailing list