Sei sulla pagina 1di 1

338

Objects and Run-Time Efciency: C++

BJARNE STROUSTRUP

Bjarne Stroustrup is the principal designer of C++. Bjarne came to Bell


Laboratories in 1979 after nishing his M.S. degree in Aarhus, Denmark,
and his Ph.D. on design of distributed systems in Cambridge, U.K.
Working on distributed computing, in the same Computing Science
Center as C and Unix designers Ritchie and Thompson, Stroustrup decided to add object-oriented features from Simula to C. His goal was to
further his personal research objectives, which involved simulation.
An occasionally reserved but essentially gregarious and friendly person, Stroustrup was catapulted into the technological limelight by the
success of C++, rst within AT&T and later in the wider community of
practicing software developers. He has written several books on C++, including The Design and Evolution of C++ (Addison-Wesley, 1994), which
contains an interesting history, explanation, and commentary on the
language. Bjarnes nonresearch interests include reading books that are
not about computer science, photography, hiking and running, travel,
and music.

implement C integers as objects, for example, and use dynamic method lookup to
nd integer functions at run time as in Smalltalk, as this would signicantly reduce
the performance of C integer calculations. The principle does not mean that C++
statements that also appear in C must be implemented in exactly the same way in
both languages, but whatever changes are adopted in C++, they must not slow down
execution of compiled code unless some slower features of C++ are also used in the
program.

12.1.1 Compatibility with C


The decision to maintain compatibility with C has a pervasive effect on the design of
C++. Those familiar with C know that C has a specic machine model, revealing much
of the structure of the underlying computer architecture. In particular, C operations
that return the address of a variable and place any bit pattern in any location make it
possible for C programs to rely on the exact representation of data. Therefore C++
must adhere to the same data representations as C.

Potrebbero piacerti anche