Most C programmers are NARGs (from "Not A Real Gentleman"),which chiefly means that they have no charm, and here's why.
Whereas a gracious adult seeks to make others feel glad about the extent of their knowledge (he is charming), a NARG will take every opportunity to make others feel dismayed about the limits of their knowledge (he is not charming). Computer-NARGs, not satisfied with the power of science to make non-scientists feel stupid, have developed elaborate secret languages and cyphers, the main effect of which is to confuse the layman. The mentality behind cryptic communication is no mystery to most of us. I recall from my childhood the fascination I had with secret codes. My friends and I would pass coded notes to one another in class. Someone finding such a note would, we hoped, wonder, "What fascinating message is contained herein?" and, being unable to read it, would never be disillusioned (unless, of course, she went and begged one of us CODE-WRITERS for a translation). We got such a thrill out of writing in code that there was no need for us to worry about the content of our messages. It was using the cypher that was fun. In fact, the secret code made everything we wrote seem clever, and all because: OTHER PEOPLE DIDN'T KNOW WHAT WE WERE WRITING ABOUT. Not at all charming, and certainly not the way to win new friends, let alone lovers, in the adult world.
Of course, we hope kids will learn the value of charm in school. But the school system is not perfect, so many kids still grow up to be NARGs. Computer programming, as a young science, is ideal territory for a NARG. The NARG programmer can invent as many cyphers as he likes with which to mask the underlying simplicity of his profession. Non-programmers, of which there are many, are easily dazzled by such cyphers, mistaking the difficulty they present for a difficulty presented by the principles of computer programming. Thus, by writing in cyphers, NARGs promote themselves as masters of an arcane art, when in fact they are merely childlike practitioners of a simple craft. Instead of working to produce masterfully clear and unambiguous programs, they strive to encode as much information as possible into each cryptic symbol, and claim to be striving for "elegance".
Consider UNIX, the NARG's favorite operating system. It is"powerful" (in NARG-speak) because its syntax is loose. It is "elegant" because instructions can be concatenated on a single line. Its commands are cryptic:
UNIX command Function
And then there is "C", the NARG's favorite programming language. Wheras a simple Pascal looks like,
program example (output);
the same program in "C" comes out as,
C's cryptisism goes far beyond its reserved words. Whilephilosophers and linguists have built up a potent understanding of the syntactic constructs that lend themselves to clear and unambiguous expression, the designers of C have seen fit to throw all such constructs to the wind. For example, in C one finds that an assignment statement such as "let x be 3" can be treated not only as an assignment statement, but also as a number, and, moreover, AT THE SAME TIME. Thus we can say "let y be 'let x be 3'" and mean that 'let x be 3' should be treated first as a command to do something, and then as a number to be assigned to the variable y. C allows the same object to be classified at the same time into two types that the merely college-educated laymen has been taught are mutually exclusive. Our conviction that something cannot be both a number and a statement is so ingrained that we cannot hope to make sense of the above C statement without help from a (you guessed it) C-PROGRAMMER.
NARGs defend C by saying it is "powerful" because its syntaxis loose ("you can play wonderful tricks with pointers") and "elegant" because it requires less typing ("i++ is much more elegant than i:=i+1"). C programmers also claim you can do important things in C that you cannot do in an easy-to-read language like Pascal. Invariably in such cases, the C programmer either does not know Pascal ("you can't do objects in Pascal," or, "You can't do hash tables in Pascal"), or is suggesting that one do something uneccesarily and unspeakably ugly that Pascal deliberately forbids ("I want to pass a function to a procedure by passing a pointer variable rather than a function variable"), or is referring to properties of the compiler ("what about compiler macros?"). C programmers are also fond of expressing fantasies about C being faster than Pascal, but I have yet to see anyone prove this, despite having been subjected to several attempts at a demonstration.
A practical problem with C and UNIX is that programmers, beinghuman, become distracted from their jobs by the joys of encryption and abbreviation. Witness the following entry in a C newsgroup:
|> I think you can use %[^\n]\ns to include spaces
Make that %[^\n]%*c. \n is not a command to read a newline, it reads all whitespace following, and is often inconvenient in this context. %*c reads and discards one character: and as it follows %[^\n], this character, if it exists, is a newline.
What's more, with the rise of cryptisism, the original tenets of goodprogrammming are now openly spurned:
> I don't even care if it's non-portable, or "illegal". As long as it
> does what we what it to do, in my opinion it's good code.
Fortunately, the prevelance of cryptisism is good news forthose of us who stick to a clear language like Pascal, and try to make our code as readable as possible. Clear programming is not an asthetic goal, but a practical one. It leads to reliable code, quicker development, and extended utility; and for this people are prepared to pay. The longer the majority of programmers are distracted by cryptisism, pointer-tricks, and programming fasions, the longer those of us who keep ourselves disciplined can expect to have the advantage. Not only that, we will reap the benifits of NOT BEING NARGS.
The people who really get thrown off course by C are laymenwho want to acquire a basic understanding of programming. It is hard for them to avoid being suckered into learning C as their first language. They spend so much time struggling with it that, once they have learned it, they get the impression that they have learned something about computers. Sadly, all they have learned about is a stupid-looking cypher composed by NARGs. The fascinating secrets of computer programming remain a mystery to them. AND THAT'S THE WAY THE NARG LIKES IT.
But the reign of the NARG in the computer world will soon drawto a close. Even as we speak, the Internet is being annexed by people from all walks of life. In the alternative newsgroups, NARGs are putting up notices demanding that people, "repect the newsgroup etiquette," by which they mean, "don't make fun of us." Soon, even computer programming will be overwhelmed by non-NARGs, and when that time comes, people will look at C and say,
"What the %[^\n]%* is this?"
So until then, let the NARGs have their fun.