Here are three superstitions about C and its descendant languages including C++, perl, Java, and C sharp.
Every statement ends in a semicolon: untrue: a statement can be made of any single statement, or any series of statements, by surrounding the statement or series of statements with curly braces: indeed, understanding block structure is key, and placing a semicolon after a right brace only annoys your compiler (assuming it has emotions) because this creates a null statement between the right brace and the comma.
This is true for all languages in the family.
You must always use a { } block in for loops, while loops, and if blocks: nope. If the looped or selected statement construct is one statement and like to remain so, it is best to leave out the surrounding braces which are syntactic sugar.
C, and languages descended from C, are great: no, they aren’t. C was never intended to live so long by its original developers. It was intended as a quick, stopgap language for programming the new DEC (Digital Equipment Corporation) 10 without nonsense and encapsulates both the wisdom and the folly of computing circa 1970.
C was a rather passive-aggressive “laissez nous tranquille†(leave us alone) response to the arrogance of the MIT Multics project, which was supposed to be an enormous “computer utility†which would be tapped by the Ordinary User like electricity.
As such, C incorporated both the wisdom and the folly of an American cultural meme which America shares with the French rural right of the Petain era and the South African Boers: when the going gets tough, the tough get going…outa here, to stake out new topos in places uninhabited, or, in the case of Israel and South Africa, places inhabited only by brown and junglee men who can be eliminated.
Dennis Ritchie and Brian Kernighan could have joined forces with Algol in response to MIT’s dependence on IBM and GE compilers for PL/I which did not work properly in 1970 and stayed broken until 1974, but preferred to trek out into a new cybernetic territory.
Only the truly first-rate computing scientist should be permitted to reject a tool because of its putative defects, and education should be so open and free for all that being first-rate should be the statistical norm. The mythos “IBM compilers and hardware suck†is spread by people uneducated in IBM compilers and hardware and it is true. But this gives the ignorant no right to speak.
As such the C designers made passive-aggressive mistakes which are now so embedded in all of the C family languages that they will never be fixed, and also mistakes which took a lot of work to fix and today create misunderstanding.
Mistake of type A, the embedded mistake, is the syntax and semantics of the for statement which necessarily evaluates the control variable “by reference†and does not as in the case of other languages make a by value copy. The syntax is overgeneral, one of those overgeneral structures which seems cool until one reflects that the overgenerality transgresses upon the terrain of while, which handles things in a way that overlaps with for.
Mistake of type B, the mistake that creates misunderstanding and clouds the mind, is the way in which C, and C alone in the family, gives the programmer who hasn’t gotten the very idea of how cool it is, or might be, to be a “really real†assembler language programmer, or wait a minute how about a “real†machine language programmer, or maybe a hardware engineer with a soldering gun and duct tape, out of his system.
Computing education as practised at all but elite venues, by deliberately masking deep machine structures in the name of the pragmatic anti-intellectualism of the nth-rate American university, creates I claim a deep frustration among computing students who feel, rightfuly enough, that there professors never properly inducted them into the Eleusinian mysteries of levels, all the way down.
There is in other words a justified yearning in all of us for transparency and a desire not ro reify, to take for granted, a “real world†including unexplained digital systems, but the pragmatic anti-intellectualism of the nth-rate American university (where n>1) frustrates, ultimately for the convenience of the professor and even more so the institution, this desire.
Which is why C programmers rage that their language gives them what was denied to them, a non reified access to the “bare machineâ€, which in actuality they do not have.
As in the movie Fight Club, young men without fathering will find false and destructive ways of finding their place in society and C Club is one example. The dead mansion in which today’s programmers, today’s cybernetic Eds Norton and Brads Pitt dwell, happens to be the ruins of Algol.
Algol was deliberately destroyed by IBM and also by the underdeveloped state of the European Union, which at the time of Algol, was little more than a Franco/German/Belgium coal and steel community. It was convenient at the time to US polity that Europe be weak and divided and for this reason the successive Algol teams failed to accomplish their goals while Fortran “worked†in some crude sense.
The phenomenon is part of a more general lack in American culture generally to properly instruct and spiritually mentor the young who in 1970 and today were and are abandoned in front of an unexplained TV by mothers who have to work because the father went West to work on Algol.
C, and languages of the C family, aren’t great. What is needed is a true computing science education which would combine the highest and most arcane theorizing with the actual building of a computer, and its programming starting from nothing, in the lab, in a way that would overthrow the way in which a split between theory and practice is a tool of social monitoring, surveillance, and control.
What is needed is a noncommerical authority able to design languages and systems whose goals are systematically undercut by the profit motive.
Cf. Derrida, Spectres of Marx. The ideal remains not even “liberalismâ€: it is socialism. Why is it that in mathematics we can calculate with limits and with idealizations all the time whereas socialism as a limit case remains unusable in the discourses of sociology, including a normative computing sociology, resulting in the fact that in social talk, we are calculating with Roman numerals?
Why are we forced to admire and to praise a language like C, with its flaws, and doesn’t this forced chorus of praise corrupt our spirits?
For one species of computing language is indeed the "forced admiration of the flawed" as at conferences where the invention of a scrollbar is greeted with applause.
A society with contempt for politicians, and a heightened contempt for central and universalizing efforts to make sense of the world, whether the World Court or Algol, has to look within itself each and severally, for our contempt for and fear of bodies who might take “too long†to come up with something prima facie “too complicated†or “not practical†is in part our several inability to develop an internalized superego.
The politicians and the Algol team “working†in spas and in fashionable capitals represent in part our reflections on our own superego, our own suspicion (which may or not be well-founded) that if we as computists were given unlimited time, we’d waste that time on long lunches.
A society, whether in France or in America, which presupposes Republican purity of heart, who at times might call upon men to rise above their instinct to abuse their positions, whether as President or a member of the Algol team, cannot completely mythologize the Republican dreamtime as only one historical period where in France, St. Juste was able to say “you may now scatter our limbs to the four winds! Republics will rise from them!â€, or in the Virginia assembly, Patrick Henry could say “give me liberty or give me deathâ€.
If the Liberty tree which in computing should be our liberty to use not the pretty good but the best is refreshed by the blood of patriots, this is a metaphor for the need for the survival of the pure Republican impulse and pure Republican moral seriousness, in which as a member of a language or standards body, the individual corporate employee forgets not his personal vanity (which a Puritan always suspects is controlling) but the larger vanity of his employer, and actually works for a truly higher good.
The French, and to an extent the New England, vision of the Liberty tree was that the free man would be free to be the good man, whereas the American south took Liberty as a form of axiomatic Libertarianism, in which Liberty became an end in itself and was inclusive of the paradoxical Liberty to, in Samuel Johnson's words, "drive Negroes".
I'd like in connection with C to point out a forgotten difference. Richard Stallman wanted liberty-for, not a Liberty disconnected from a *telos*. Stallman, at MIT, wanted to exchange and write software freely in order to best serve the needs of the MIT community and thereby MIT's vision (which it shares, officially at least, with other first-rate universities) of serving what we used to be able to call, sans peur et sans reproche, Mankind.
Now, what C does is provide the Libertarian form of Liberty. Gee, Ah kin gits to de address of ANYTHING. How cool is that?
Answer: not cool at all. At worst, C's aliasing allows the crafting of code which is itself unmastered by its Sophistical author, code that immiserates.
What the Algol team wanted was "true" Liberty in the French and American New England model, in which all men would agree on a minimal description of the good man, the good life, the good society, and the good program, and Liberty would empower them to pursue this form of Happiness.
As it was, Bob Bemer of IBM was sent in bad faith in the 1950s to represent IBM at the Algol team primarily as a spy even as IBM in 2000 made a bad-faith agreement with SCO to work on industrializing Linux so that IBM could, according to SCO’s lawsuit, get not Linux but proprietary unix.
Acting in bad faith as an agent of a corporation is the real corruption because it permits us to externalize…to blame “George Bushâ€â€¦in a society in which the lying starts with us, in which we always presuppose that we are not “wasting time†if we are “making moneyâ€.
Laissez faire, the culture of all consumption all the time, whispers that this is so, that man lives by bread alone, and that for this reason has to be subject to a brutal, and brutalizing regime of quick Fortran results, or at best to the “alternative†C-libertarian culture of “rough consensus and running [not correct?] codeâ€, a sort of high-tech Lynch mob involving the systematic hounding of “free†men who were “free†to demur, to be found out, to accomplish anything; to get work done, the libertarian Lynch mob gives the truly creative individual only enough rope to hang himself.
The suspension of personal greed and sloth in a secular Constitutional convention becomes a myth and for this reason we have C as a damaged Pole star.
Purity of heart becomes a joke in a universalized Fight Club which despite its “libertarianism†is the tyranny of the mob in fashionable guise, in which the mob sees nothing higher than C.