Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!att!dptg!ulysses!andante!alice!bs From: bs@alice.UUCP (Bjarne Stroustrup) Newsgroups: comp.lang.c++ Subject: Re: Is this legal? Summary: philosophy Message-ID: <11062@alice.UUCP> Date: 18 Jul 90 16:12:16 GMT References: <10164@odin.corp.sgi.com> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 96 In article 8852 Piercarlo Grandi @ Coleg Prifysgol Cymru writes: > Let me repeat here my usual tirade about the difference in attitude > between European (algorithmic language) and USA (programming language) > ideas of the role of programs and languages: > > Programs for Europeans are there to communicate the > implementation of an algorithm, either to programmatic > (e.g. compilers, pretty printers, verifiers) or human (even > more important!) readers. As such it should be as clear and > unambiguous as possible, and as informative as it can be without > becoming hard to read because of verbosity. > > The USA position is that programs are there to drive a > computer to perform a task, and as long as they "work", who > cares... This kind of tirade is somewhere between unhelpful and dangerous. It is a wild generalization that reinforces prejudices and thus allow people (on BOTH sides of the `divide') to feel superior and avoid learning from experience. Had the generalization been made about your favorite `minority group' rather than the unprotected species of `American programmers' and `European programmers' it would have been recognized as utter bad taste and an inditement to further antisocial behaviour (and probably been illegal under the paternalistic laws of the US and UK). So please, please, cool it. Let's keep the discussions on comp.lang.c++ technical and civil. Also: Apologies to Piercarlo for using his posting as an excuse to ride one of my hobbyhorses. As a European living and working in the US I have had many opportunities to (suffer from and) pounce on American parochial attitudes about/against Europeans and other aliens and as a person living in the US and visiting various parts of Europe often I have had many opportunities (and often no acceptable alternative than) to defend Americans and other foreigners against nasty and unfair labeling by parochial Europeans. I assure you that no side of the Atlantic (or the Pacific) have a monopoly on virtue, parochialism, competence, or incompetence. Back to programming languages: (I deliberately use `programming language' rather than `algorithmic language' here following what I consider common English Academic usage - in my case learned at Cambridge (UK). I also feel that `algorithmic languages' places an undue emphasis on the computational aspect of programs at the expense of structural aspects: We are after all considering the general issues in the context of a language that supports object-oriented programming. `Algorithmic languages' is appropriate for Algol and Fortran, but maybe less so for C++ and Smalltalk.) I clearly think that Piercarlo's characterization of programming languages is inappropriate. A programming language serves BOTH as a means of communication between programmers and between programmers and machines. Forgetting one of the two while concentrating on a specific task is easy, but I don't think any serious programmer would argue that only one of the two are of importance in general. Consequently we are talking about emphasis; not about absolutes. If you forget the human to human communication aspect of programming you can easily create a maintenance nightmare. Examples abound on both sides of the Atlantic. If you forget the human to computer communication aspect of programming you can easily get a performance nightmare. Examples abound on both sides of the Atlantic. (Again:) So let us cut the US/Europe characterization: It is divisive and inaccurate. Curiously enough, you can also get a maintenance nightmare from overemphasis on `structure' and `readability' (especially by emphasis on minutely applied detailed formalisms) and a performance nightmare from overemphasis on performance (especially by emphasis on low-level performance at the expense on overall structure). There is no simple solution, no holy grail, no silver bullet, so let us cut the preaching, posturing and labeling, and get on with the hard work of trying to figure out more reasonable and more manageable ways of designing, constructing, testing, tuning, documenting, and maintaining systems. It is so much harder being constructive than simply to criticize. Further, back to C++ (this is comp.lang.c++ after all): C++ is designed to be both an effective medium for human to computer communication (that is primarily the `C part') and an effective medium for human to human communication (that is primarily the `++ part'). See the `Efficiency and Structure' sections of the `Notes to the Reader' chapter of my (first) book. Naturally, like every other language, C++ is not perfect, but at least some of the tradeoffs in this particular area have proven successful over a wide range of applications and programming cultures. - Bjarne Stroustrup