University of Virginia, Department of Computer Science
CS655: Programming Languages
Position Paper 4
03 April 2000
The Prosecution did not show significant harm and therefore did not prove their case. In order to justify my decision, I would like to comment on each charge advanced by the Prosecution.
The Accused has knowingly created an ambiguous language definition that has led to gross differences in language implementations in various compilers, as well as gross differences in the behavior of its program code.
This argument was illustrated by Mr. Yukl who was confronted with implementation disparities while porting C/C++ code from SGI 32 bit systems to SGI 64 bit systems for example. However, the Defendant is not responsible for this situation which was anterior to the design of C++. I consider that C++ has inherited this feature from C. Mr. Stroustrup never claimed that C++ remodeled C. The Defendant is exonerated from this charge.
The Accused has knowingly implemented programming language “hacks” that place an unnecessary burden of complexity on the language users.
Again, Mr. Yukl has convincingly illustrated that C++ placed a burden of complexity on the language users. The Defendant himself admitted that C++ design could be compared with a maze while answering insidious questions of one of the Prosecution attorneys. However, the Prosecution failed to prove that this burden was unnecessary. For its part, the Defense showed that this complexity could not only be necessary but also a requirement of the Industry. In particular Mr. De explained that the power of C++ outweighed its complexity and Mr. Gates told us that most of his very popular operating system was written in C++ and made it clear that his team did not seem to have any problem managing such a huge project (they are paid for that). I would tend to think that the complexity of C++ is not unnecessary. The Defendant is exonerated from this charge.
The Accused, by building his language upon an existing “hack” and adding more hacks has further contributed to the promotion of a “shopping list” language.
This charge does seem hazy to me. At least, this has not been clearly proven by the Prosecution. And how is it bad for the users? The Prosecution should have been clearer about this point. The Defendant is exonerated from this charge.
The Accused has knowingly designed programming language features that discourage users from writing clearly understandable code.
This is not true. First, I think that the Defendant has not knowingly designed anything to harm programmers. Second, I think that Mr. De has undeniably proven that users are not discouraged from writing understandable code. In most computer companies, professional programmers are tied to write under strict standards to provide readability and maintainability. Even though C++ does not enforce readability by itself as illustrated by Mr. Yukl, it does not discourage users from writing clearly understandable code. The Defendant is exonerated from this charge.
The Accused has knowingly designed a programming language that produces code that is unnecessarily subject to run-time errors.
This charge would tend to give a wrong idea of what programming is. The Prosecution would like to make me think that a programming language can be responsible for the code produced by a user. My own experience of poor programmer is a valid argument to claim that users can produce code subject to run-time errors with many other languages. In my opinion, the fact that users have some difficulties to write correct code in C++, deals with the complexity of the language and is a direct consequence of the charge 2. So I send the reader back to my comments on the charge 2. I listened to the testimony of Dr. Liskov with interest. A programming language which could help users writing correct code, is a great idea. However, the number of programmer(s) in CLU and, the fact that even Dr. Liskov seems to distrust her language so much that she prefers to teach Java, make me think that CLU is only an experimental language paved with good intentions. Therefore, the Prosecution cannot claim that CLU is a good example of a successful programming language that Mr. Stroustrup should have considered while designing C++. Finally, C++ has inherited many of the features of C such as run-time errors from incorrect code. The Defendant is exonerated from this charge.
The Accused, by providing unchecked flexibility in his programming language, has insidiously promoted poor programming style.
Dr. Liskov and Mr. Kay have showed that CLU and Smalltalk both provide a programming style which is much more elegant than what an average C++ programmer can do. For his part, Mr. De has showed that the Industry can compensate this trend with strong and strict standards. Mr. Yukl has illustrated that C and C++ are still used even though the poor quality of the programming style is a real burden for the company. Mr. Gates has succeeded in writing the most popular operating system with this poor programming style. So it seems that professional programmers and PC owners have settled: poor programming style is not as harmful as lack of flexibility. I do agree with the Defendant when he says that a programmer who does not think flexibility is a key of modern programming should be given the task of writing a web browser using COBOL. The Defendant is exonerated from this charge.
The Accused, by providing unchecked flexibility in his programming language, has unduly cornered programmers into endless nights of nerve-wracking debugging, causing unwarranted pain and suffering.
This charge does not appear very serious to me. I think the Prosecution tried to influence the Jurors by associating C++ with painful memories of endless nights of work. Indeed endless nights of nerve-wracking work can be caused by C++ but also by CS655 problem sets, position papers and project. Shall we sue Mr. Evans? The Defendant is exonerated from this charge.
The Accused has created a language that promotes a confused view of Object-Oriented programming and design (OOP/OOD). By virtue of his influence and success, the accused has corrupted the idea of OOP in the minds of young programmers. By providing object-oriented capabilities in a language that is unsuitable for proper OOP, the accused has compromised the future of object-oriented design.
There exist several views of OOP. The problem of the definition of OOP is very confusing and tends to be theological from my point of view. Our class of Programming Language concludes by saying that OOD is more a state of mind than a precise set of features. Smalltalk, Java and C++ all provide their own interpretations of this state of mind. The Prosecution failed to show convincingly that C++’s own interpretation could compromise the future of OOP. Mr. Kay proposed another attractive solution for OOD but admitted that his language was less flexible than C++. For the Prosecution, simplicity and less flexibility seem to be the factors of a better OOD. I would tend to think that in the contrary C++ promoted OOP by providing a programming language widely accepted which supports such features. The future of this concept is more in freedom than in a dogmatic simplicity. The Defendant is exonerated from this charge.
Like Mr. Stroustrup, I think it is appropriate for the user to decide what he wants to do. He has all the features, it is up to him to use them properly. Unlike Dr. Liskov, I think that the future belongs to overly complex programming languages.