Subject: Compiling to PostScript

From: Wm Leler <[email-masked]>
Date: Tue, 1 Dec 87 13:36:39 EST

> PostScript reminds me of an intermediate language generated by a
> compiler, not a language suitable for human beings to think in.
Perhaps the reason that PostScript is reminiscent of an intermediate
language is because it was designed to be an intermediate language,
generated by some program and sent to a printer.  The fact that it
is human readable doesn't matter (the output from typesetter
independent troff is also "human readable").

> I propose a new language which is high
> level, and is then compiled into postscript, ...
> If you can't think of a specific language (I vote for C, or something
> very much like C), indicate what language capabilities should be there.
Lisp is a natural for this.  Both Lisp and PostScript are dynamic,
easily interpreted, treat procedures as reasonably first class objects,
and have an excrutiatingly simple syntax.  It is relatively easy to
translate (a subset of) Lisp to PostScript, which is exactly what
LispScript does.

One could actually make a reasonably convincing case that PostScript is
a higher level language than C (and I'm mainly a C programmer).  I
heard James Gosling say at a conference that some people at Sun prefer
programming in PostScript to C (my guess is because, as an interpreted
language, PostScript is easier to debug).

If you are going to compile some higher level language into PostScript,
let it be something that is reasonably good at computer graphics, for
example Smalltalk.  I've heard people talk about it, but is anyone
actually working on a Smalltalk system that generates PostScript (or a
Smalltalk that uses NeWS for user interaction)?  I've love to have
Smalltalk running on some big machine (a Cray?) with the graphics
running on my local workstation.

If you absolutely must have a static language, how about C++?  You could
define abstract data types for dictionaries and other PostScript datatypes.

> Send today, I'll also bring this up at the Sun User's Group meeting Monday!
Perhaps they are working on a Smalltalk with NeWS?  Or would know about
any projects to compile other languages into PostScript.

Wm Leler
The PIX Project
University of Manchester

---

From: Stoney Ballard <[email-masked]>
Date: Tue, 1 Dec 87 18:31:59 EST

>   actually working on a Smalltalk system that generates PostScript (or
>   a Smalltalk that uses NeWS for user interaction)?  I've love to have

Well, actually we at PARC/SCL (the Smalltalk group) are doing just that.  It's
not clear at this point just how we are going to make Smalltalk use NeWS - we're
going to try a few alternatives to see what feels best.  One of our goals is to
completely hide PostScript from the application programmers, not because it's an
icky language, but because it doesn't participate in the object world of
Smalltalk.

This is a major change to the structure of the Smalltalk user interface and
graphics primitives.  We don't expect to have it completed anytime soon.

	- Stoney Ballard
	  Xerox PARC NW