Concepts of Programming Languages

(Sean Pound) #1

90 Chapter 2 Evolution of the Major Programming Languages


2.16.4 A Related Language: Objective-C


Objective-C (Kochan, 2009) is another hybrid language with both impera-
tive and object-oriented features. Objective-C was designed by Brad Cox and
Tom Love in the early 1980s. Initially, it consisted of C plus the classes and
message passing of Smalltalk. Among the programming languages that were
created by adding support for object-oriented programming to an impera-
tive language, Objective-C is the only one to use the Smalltalk syntax for
that support.
After Steve Jobs left Apple and founded NeXT, he licensed Objective-C
and it was used to write the NeXT computer system software. NeXT also
released its Objective-C compiler, along with the NeXTstep development
environment and a library of utilities. After the NeXT project failed, Apple
bought NeXT and used Objective-C to write MAC OS X. Objective-C is the
language of all iPhone software, which explains its rapid rise in popularity after
the iPhone appeared.
One characteristic that Objective-C inherited from Smalltalk is the
dynamic binding of messages to objects. This means that there is no static
checking of messages. If a message is sent to an object and the object cannot
respond to the message, it is not known until run time, when an exception is
raised.
In 2006, Apple announced Objective-C 2.0, which added a form of garbage
collection and new syntax for declaring properties. Unfortunately, garbage col-
lection is not supported by the iPhone run-time system.
Objective-C is a strict superset of C, so all of the insecurities of that lan-
guage are present in Objective-C.

2.16.5 Another Related Language: Delphi


Delphi (Lischner, 2000) is a hybrid language, similar to C++ and Objetive-C
in that it was created by adding object-oriented support, among other things,
to an existing imperative language, in this case Pascal. Many of the differences
between C++ and Delphi are a result of the predecessor languages and the
surrounding programming cultures from which they are derived. Because C
is a powerful but potentially unsafe language, C++ also fits that description,
at least in the areas of array subscript range checking, pointer arithmetic, and
its numerous type coercions. Likewise, because Pascal is more elegant and
safer than C, Delphi is more elegant and safer than C++. Delphi is also less
complex than C++. For example, Delphi does not allow user-defined operator
overloading, generic subprograms, and parameterized classes, all of which are
part of C++.
Delphi, like Visual C++, provides a graphical user interface (GUI) to the
developer and simple ways to create GUI interfaces to applications written in
Delphi. Delphi was designed by Anders Hejlsberg, who had previously devel-
oped the Turbo Pascal system. Both of these were marketed and distributed by
Borland. Hejlsberg was also the lead designer of C#.
Free download pdf