[net.lang.pascal] Pascal for the Macintosh Review

bills@cca.UUCP (Bill Stackhouse) (11/04/86)

This is in response to a request for reviews on Pascal for the Macintosh.

There are several Pascal compilers for the Macintosh, the one I
prefer is Lightspeed Pascal (LSP) from Think Technologies Inc. ($125).
While this is from the developers of Macintosh Pascal, an interperter
based system, LSP is NOT even close to being the same product.

The main feature that stands out about LSP is that it provides a
single integrated development environment that is complete with
an editor that is knowledgeable of the Pascal syntax, a compiler,
linker, and source and object level debuggers. Separate compilation
is provided in a Modula-2 like manner with the source of each
module divided into an interface section and an implementation
section.

Projects

For each program, a project file is created. LSP uses the project
to store pointers to each source file, the object code from compilation,
and the interface sections of source programs. Within each source,
the related other source files are declared with a USES statement.
Each time a program is linked, the project provides the information
for an automatic MAKE.

Editor

The editor is syntax directed and highlights basic syntactic errors
like unbalanced parenthesis and missing semicolons. It also displays the
source in a "pretty printed" format with all reserved words (begin, end, ...)
in a bold type face. Multiple windows (up to 9) can be opened at one time 
and text can be cut and pasted between windows. The editor supports printing
on both dot matrix and laser printers. The printed output appears the
same as on the screen. A header appears on each page with the page 
number and date/time it was last edited.

Compiler

The compiler is extremely fast, upwards of several thousand lines per
minute (I believe the number used by the vendor is 10,000?). Because
the total source for a single program is divided into modules (units),
a single source may be quite short and the compile time is minimal.
I typically wait only a few seconds for a compile. The compiler can
be run in a syntax check mode or check and generate code mode.

Linker

Linking happens automatically when you request that your program is to be
run. All modules than have been changed, but not yet compiled are
compiled. Also any other modules that "use" a module whos interface
section has changed are compiled. This all happens automatically, there
is no MAKE file to maintain, and you don't have to think about which
modules you need to recompile, it just happens. Also only the changed
modules are relinked, saving quite a bit of time.

Debugging

While your program is running, you have the following debug options:
1) multiple breakpoints set by placing a "stop sign" by the statement
2) source level tracing which appears as a "finger" moving along the
   left edge of the source while executing.
3) at a break point, you may examine and alter variables through a debugging
   aid known as LightsBug. This displays stack frames and memory. Pointers
   can be followed to the memory referenced (really help since Mac pointers
   are usually double references).
4) single step a program. This plus LightsBug really simplifies checking
   out parts of code without adding any extra lines.
Each module in a project can have 4 compile options: debug, range check,
overflow check, and symbolic variable names. These can be independently set 
so that modules which work do not have to be burdened with any extra code.

Finished Program

When you are satisfied with your program, you can link and save it as
a standalone application. Partial programs, known as libraries, can
be created so that other projects can use the code without needing
either the source or recompiling.


LSP has been out since Aug. 86 (I've had my copy since then) and I find
it quite complete and solid. Yes you can break it, but in general it
works as expected. The code is good but not "optimized". Your 
productivity will increase enough that you will not care about
the quality of the object code. Mac development is not easy, address
errors will cause the Mac to reboot which will waste several minutes
each time. With LSP, this relatively common error will be trapped for
you and the source line with the failure will be pointed out. That
alone was worth the cost of the product.

There are a few differences between LSP and Standard Pascal. For Mac
development, that is not too important.

Overall, a truly GREAT development system.

Bill Stackhouse
bills@cca.cca.com