On Thu, 22 Dec 2022, at 20:20, Phil Smith III wrote:

> Jeremy-you realize that PostScript is about as far as you can get from
> markup in a lot of ways, right? It's fun stuff but not what people generally
> mean when they say "markup". Just sayin'.

Good point!

When I used DCF, I wrote a lot of macros; my most complex set used two
separate definitions of a whole set of macros; the first set were used on 
the first pass through a set of related documents and generated a whole 
set of intermediate files.  Then the second set of definitions were used 
for a conventional 2-pass process to generate the final documents,
reading both the original files and all the intermediate ones.

So to some extent it's the programmability that I really miss - and the 
facility for embedded comments.  The PS example has both.  If one 
defines a tailored set of macros (or - in PS - PS commands eg in the 
building plans file, a command to draw a wall) then the source file 
becomes at least in part a long sequence of commands, interspersed 
with text to be placed on the page.  Eg, near the start of the file there's
this

/smoke_alarm              % S: x_pos y_pos                %{{
{ newpath 1 index 1 index 80 0 360 arc 1 index 1 index 
60 0 360 arc 40 0 360 arc stroke } def 

which is a definition (the trailing "def") of a macro named "smoke_alarm"

(which draws a symbol consisting of three concentric circles).  It takes 
2 parameters (off the stack) which are the x and y positions on the 
page where it is to go).

Later on in the file we have for example:     4200 7000 smoke_alarm 
(and quite a few other calls).

My main criticism of the way the PS was written is that there's too 
many instances of actual numbers.  I'd rather have seen eg smoke 
alarm positions defined in terms of the symbolic locations of the
nearby walls, and the distance from a wall that an alarm should be
placed at.  It'd make the code easier to understand too.

-- 
Jeremy Nicoll - my opinions are my own.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to