History Of C++: Origins And Examples

3162 WORDS
Read the full essay 3162 words
History of C++: Origins and Examples

Devon Hudson O'Dell

Origins of C++

What are C++ and OOP?

C++ is an advanced, high-level programming language (?Computer languages?) that is used to develop powerful applications for Microsoft? Windows?, many Linux environments, and other well-known and widely used operating systems.  C++ is quickly becoming the standard language for commercial software development (Oualline).

OOP, an abbreviation for object-oriented programming is simply code that ?attempts to place a new layer of abstraction between the programmer and the data he is working with ? this layer will help the programmer develop better code more quickly than he could do before.? (McHale).  OOP languages must include four fundamental concepts before it may reasonably be defined as object-oriented (O-O): encapsulation, polymorphism, inheritance and the ability to be dynamic (McHale).

Where did C++ come from?

C++ was designed and implemented by Bjarne Stroustrup who works for AT&T Bell Labs as head of the Large-Scale Program Research department where he is heavily involved with the evolution of his product (Duffy, 98).  His development, originally called ?C with classes? was a marriage between a language called Simula67 with object-orientated features and C, which was powerful and efficient in its design.


John Backus at IBM developed Fortran in 1956.  Fortran, an abbreviation and acronym for FORmula TRANslation system, is generally considered to be the first high-level programming language.  Fortran is, even today, a language of choice among programmers, its latest release, Fortran 90, in 1990.  Early versions of this language would be largely criticized today [there were a few problems like the program layout, which had to obey certain criteria like an 80 character maximum line (the length ?of a punch card on which the programs were often written?) (Parsons) and the first six columns were reserved for labels and comments, denoted by the keyword C]; however, this language influenced every language used today in the programming community in some way.  A sample Fortran program would look like this (the digits 1, 2, and 3 in this program are labels and .GT. signifies a comparison checking to see if the variable, H, is Greater Than 5):

DIMENSION A(5), B(5,2)
DO 1 I = 1,5
1A(I) = 6 - I
H = 1
3IF (H.GT.5) GO TO 2
B(H,1) = 1
B(H,2) = 5 + 3 * (H - A(H) )
H = H + 1
Algol, short for ALGOrithmic Language, is perhaps the most influential programming language ever created.  The first implementation arose in 1958 and quickly became the standard for expressing algorithms.  Algol was most widely used in the academic community, which thusly led to its widespread usage.
integer h, i;
real array A[1:5], B[1:5, 1:2];
for i := 1 step 1 until 5 do
A[I] := 6 - i;
h := 1
Loop: if h <= 5 then
B[h,1] := 1;
B[h,2] := 5 + 3 * (h - A[h]);
h := h + 1;
go to Loop
end P

The similarity between such modern languages as Pascal and Modula-2 and Algol proves it influential to the programming community, even today.  Algol also introduced the concept of ?free-format,? a concept that allows programmers to arrange the code any way they want (assuming the syntax is correct) (Parsons).  This concept proves itself useful today in making source code easier to read and eliminating the problem of ?spaghetti code? (code written in an unreadable fashion, or strung together as spaghetti is).


Simula67 was developed by the Norwegian armed forces (Kristen Nygaard and Ole-Johan Dahl at the Norwegian Computer Center) and was the first of its kind to use classes (as class is defined by ?a program unit containing both data and associated functions?) (Overland, 3).  Its development was initiated between 1961 and 1967.  SIMULA I, appearing first in 1964, was designed as a system simulation and modeling language.  It would consider each part of a system as a separate entity and allowed for interaction between separate entities.  This language was based upon Algol and shares Algol?s ?free-format? syntax (Parsons).  Stroustrup considered Simula67 ?the first real object-oriented programming language? but felt that it was ?too slow? (Duffy, 98).  Simula67?s source looks similar to that of C, a sample program looks like:

system Airport Departure := arrivals, counter, fee collector, control, lobby;
customer passenger (fee paid) [500];
Boolean fee paid;
station counter;
begin accept (passenger) select;
(first) if none: (exit);
hold (normal (2, 0.2));
route (passenger)

Related Topics

Procedural programming languages Fortran ALGOL Object-oriented programming Conditional High-level programming language Array data type Goto F Generational list of programming languages Fortran 95 language features programming language fortran level programming language commercial software development oop languages john backus linux environments formula translation object oriented programming c with classes punch card history of c program layout translation system maximum line object orientated computer languages stroustrup fundamental concepts encapsulation polymorphism