bob@imspw6.UUCP (Bob Burch) (09/01/88)
From my buddy Ted Holden over at HTE:
Prior to the arrival of Turbo C and the new generation of
compilers, which are heavily influenced by Turbo Pascal, I had no
difficulty telling people that Turbo Pascal was the single
niftiest animal which lived in the DOS world. Turbo Pascal is
one of the key products which made the PC, as are also such
things as 123, WordPerfect etc.
Recently, I have been playing with a product which I have
come to regard as the Turbo Pascal of 1988, a product which will
heavily influence all future compilers and cast a giant shadow
over the landscape: the Zortech C++ compiler. C++ is the first
thing I have seen which has made me WANT to change the basic
style of programming I use, which has not really changed much
since 1977 when I began using the Univ. of Oregon FLECS pre-
processor for Fortran.
C++ adds the entire object-oriented paradigm to the C
language without sacrificing anything at all. All of the low-
level power of C is still there. All of your C libraries are
still usable, you still have an open system. C++ is a larger
language than C, but still far smaller than Ada; C++ therefore
lacks the most noticeable feature of Ada, Lisp, and one or two
other "languages of the future": it is not slow. Unlike Modula-
II, C++ has a powerful base of support; AT&T is fully committed
to it and is writing the kernels of the next generation of UNIX
systems in it and it appears that C++ will be billed as the major
systems language with these new versions of UNIX.
In addition, the following kinds of things are possible:
1. You can devise classes for matrices, complex numbers, all of
the animals which populate the realms of math, physics etc.
and, using the facility for overloading operators which the
language provides, have them behave properly, defining
adequate meanings for multiplication, addition etc. both for
matrices amongst themselves, say, as well as for matrices
times scalers etc. and have the language function as if
these features came with it. C++ can be viewed, therefore,
as having all the power of, if not more power than APL and
is still readable. Mathematicians and scientists could
leave Fortran and/or APL for C++ with no regrets.
2. You can devise classes of visual objects along with class
functions for moving, turning them etc., and then simply
declare them the way you would integers or strings. You can
thus populate your screen with multitudes of ghosts,
aircraft, bears, windows or whatever with less code than
you've ever seen. Unlike Ada, C++ has inheritance of
classes; you could have a generic class of aircraft
containing 80% of what was needed to put aircraft on the
screen, and inheriting subclasses for F-16s, F-18s, MIG-27s,
etc. with a minimum of code. Anybody writing games in
anything other than C++ from now on has to be nuts.
3. Beyond that, polymorphism is the killer feature in the object
-oriented paradign which was left out of Ada. Using it in
ordinary business programming, you can write large and
complex programs to which modules can later be added without
changing any of the existing code at all!!!!! Pinson and
Weiner give an example of this sort of thing in chapter 6,
which should be read by anybody concerned with maintainability
of large programs.
4. You can devise classes of strings which behave as in Turbo
Pascal, a simple plus sign serving to concatenate them, and
generally devise ways to make the language more to your own
liking, adding your features. You can devise classes of
counters or indices which stay within set ranges and, with
very little effort, using similar techniques, eliminate all
of the mechanisms with which programmers come to grief using
C, especially in large, multi-man-year efforts.
The new $100 Zortech C++ compiler for DOS machines is as
neat as can be. It can roll up C, C++, and MASM modules in all
the various memory models. It appears slightly faster than Turbo
C for ordinary C compiles, and easily compiles several examples
of Berkeley type code which I regard as difficult tests and
which, specifically, I've seen the Mark-Williams and Aztec
compilers break on. It comes with a global optimizer, a good TSR
on-line help facility, more like the Peter Norton or Santa Rita
products than the on-line stuff from Borland products, a graphics
package which isn't worth writing home about but which is free,
and a very strong editor with many of the features of the Turbo
interactive systems.
The list of bugs turning up for the Zortech compiler is a
short one, more like Turbo C than like Microsoft products. The
company is fixing them as they turn up and has recently shipped a
version 1.05 as a free upgrade to customers. A very readable
manual is included which, along with the Pinson/Weiner book, will
provide a most people with a very warm and fuzzy feeling for C++
(I am among those who regard Stroustrup's book as unreadable).
As far as I can tell, this product is one or two iterations
away from being for future programming what Turbo Pascal is for
today's programming and, given the industriousness and grace with
which Zortech is handling upgrades, I have no problem with
spending the money now. The present version, 1.05, compiles
everything but one or two of the more exotic examples involving
polymorphism from the Pinson/Weiner book and, as I have heard,
everything from the Stroustrup book. I have gotten polymorphic
graphic applications to work using my Turbo C version of
MetaGraphics which, incidentally, links straight in as if made
for Zortech i.e. examples with a "graphic Object" main class and
subclasses involving circles, rectangles etc., moving numbers of
them around simultaneously on an EGA screen.
Ted Holden
HT Enterprises