[net.lang.pascal] Turbo Pascal Review

nathan@orstcs.UUCP (12/12/83)

#N:orstcs:39300001:000:3879
orstcs!nathan    Dec 11 16:18:00 1983


Report on Borland International's *Turbo Pascal*

The good news:
We clocked it at over 4000 lines per minute for small programs (<300 lines)
slowing down to perhaps 2000/min for larger progs.  This compares favorably
with mainframe speeds.

It has all variety of extensions (along with a bunch of new keywords) to
implement the nice frills that are necessary for most real work.  These
include "sizeof" and all the other stuff that uses it.

It has facilities for complete initialization, including selected components
of structures; even variant records.  Unfortunately, it's syntactically
weird: you declare the initialized variables as "typed constants", although
they are really just treated as variables.

It fits in 28k, including a screen editor disgustingly similar to Wordstar.
When a syntax error is found, it switches to the editor and puts the cursor
at the offending spot.  We have not found any way to make it compile the
whole thing, just marking errors.

It does generate *native code*, which compares reasonably with other
machines (runs Sieve on a PC in 10 sec, compiles in <1 sec.)

It costs only $50!

The bad news:
It does not support any useful variety of separate compilation.  There
is a primitive "external" declaration; you have to tell it the address
in memory to load to.  It does have "include", though, and the compiler
runs fast enough that that might be ok.

They decided "get" and "put" were unnecessary, along with the file
variables.  This makes it a real nuisance converting other programs
to run on it. (but it can be done; can take hours, though)

There is no "new/dispose" facility; instead, they put in UCSD ("scud")
Pascal's "mark/release".  It is possible to write one in terms of the 
other, but a nuisance.

Floating point format is weird: 40 bit mantissa, 8 bit exponent.  Not
actually a fault, but not IEEE either. (better than 32 bit, anyway.)
We haven't tried it for accuracy or speed.

It supports only the "small-medium" memory model: 64k stack/heap, 
64k code, 64k global data.  It has a weird "recursion stack" that
recursive routines copy their current data area to before using
it.  (this, I presume, makes non-recursive routines quicker to call;
it also makes the code non-reentrant.)  The limits on memory usage can be 
partially resolved by a facility they provide to access memory as
	Mem[seg:offset]
with seg and offset integer expressions.

The license agreement is a bit screwy: for $50, you agree not to 
run the compiler or any of *your* programs on anybody else's box.
This includes giving the programs away.  For an additional one-time
fee of $100, you get unlimited use of the run-time package, and can
do with your programs whatever you want.  (You can, of course, give 
away your sources anyway)  The result is that the program sellers
subsidize the hobbyists, a little bit.  If you can't make $100 selling
your programs, find a different business.


*summary*
At the price, it's a superb product.  There is no reason ever to use
BASIC again for quick'n'dirty programs, as the compiler is so 
*damned* fast that for anything less than 100 lines the compile time
is unnoticeable.  It's also fine for writing utilities and other
small-but-useful programs (write an "ls" or "dc" in it).

It's not really adequate for such very large projects as "cc" or "ingres"
and the like because of the lack of separate compilation facilities,
and the ability to find more than one error per compile.  I suspect you
could use it for a long time before these became intolerable.  

I suggest that if you aren't maintaining something that big, it would
be ideal as your primary compiler (if you can tolerate Pascal . . .);
even if you need something more "industrial strength", it is easily
worth buying for day-to-day needs, especially at the price.  Even
at $150, its better than most. (hear that, Softech?)

/* ---------- */

mark@cbosgd.UUCP (12/13/83)

Nathan, you forgot to say what it runs on.  VAX?  CP/M?  Toaster?
This is net.lang.pascal, not net.micro.framus, we can't read your mind.