RE: [xml-dev] RE: Declarative programming requires a different mindset

From
Michael Sokolov <>
To
Date
2010-04-12T11:56:58Z
ID
<>
Thread
RE: [xml-dev] RE: Declarative programming requires a different mindset
Yes, but I think you missed my point, which is not that PS is like HTML, as
a language, which as you demonstrate, it is not. Rather I was trying to say
that the purposes to which it is put are (usually) the same kinds of
purposes to which HTML is put: ie laying out text and graphics.  The uses of
PostScript (in spite of its rich, complex, procedural nature) are almost all
static, declarative, and single-purpose.  And this seems odd.  Just pointing
out a curious phenomenon in the linguistic bestiary.  But it seems nobody
else finds it remarkable, so enough about that.

-Mike

> -----Original Message-----
> From: Liam R E Quin [mailto:] 
> Sent: Monday, April 12, 2010 2:03 AM
> To: Michael Sokolov
> Cc: 
> Subject: RE: [xml-dev] RE: Declarative programming requires a 
> different mindset
> 
> On Sun, 2010-04-11 at 08:27 -0400, Michael Sokolov wrote:
> > Postscript is an interesting case - I am told that it is 
> > Turing-complete, but its uses are almost entirely 
> declarative: for layout, akin to HTML.
> > Perhaps someone more knowledgeable about PS on this list 
> would care to 
> > comment on how that came to be?
> 
> PostScript is a procedural graphics language that uses a 
> reverse polish notation to manipulate a stack. Yes, it's 
> Turing-complete, or as complete as one can get with finite 
> memory :-) PostScript is nothing whatsoever like HTML -- 
> here's a simple example:
> 
> %!PS
> /Times-Italic findfont % search the font dictionary for Times-Italic
> 18 scalefont           % scale the font to 18pt
> setfont                % make it the current font
> 72 72 moveto           % Move to 1 inch from the top left of the page
> (Hello World)          % push a string "Hello World" onto the stack
> show                   % render the string in 18pt Times Italic
> showpage               % print the current page and clear the buffer
> 
> Hope this helps.
> 
> Liam
> 
> 
> --
> Liam Quin - XML Activity Lead, W3C, 
> http://www.w3.org/People/Quin/ Pictures from old books: 
> http://fromoldbooks.org/
> Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
> 
> 
> ______________________________________________________________
> _________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: 
> subscribe: 
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 
>