Path: utzoo!attcan!uunet!mcvax!ukc!strath-cs!glasgow!orr From: orr@cs.glasgow.ac.uk (Fraser Orr) Newsgroups: comp.lang.postscript Subject: Re: An Idea to Help Make Postscript Easier to Read (and Write) Message-ID: <1613@crete.cs.glasgow.ac.uk> Date: 7 Sep 88 10:37:29 GMT References: <940@helios.ee.lbl.gov> <943@helios.ee.lbl.gov> Reply-To: orr@cs.glasgow.ac.uk (Fraser Orr) Organization: Comp Sci, Glasgow Univ, Scotland Lines: 37 In article <943@helios.ee.lbl.gov> mccanne@helios.ee.lbl.gov (Steve McCanne) writes: >In article <940@helios.ee.lbl.gov> forrest@ux1.lbl.gov (Jon Forrest) writes: >>What about a "compiler" that converts standard postscript into >>what I'll call infix/function form? In otherwords, the output would > >Van Jacobson thought this was a good idea as well. He developed a language >called "PreScript" that is a lot like C, and compiles into PostScript. >I helped with the implementation; it should be out for beta testing very >soon, if not already. Look for it in comp.sources.misc. > I too have written such a program, and used it quite extensively. (I'm using NeWS rather than postscript, but the problems are essentially the same.) I have found it more than a little benificial. Someone said that they had started doing this but had come to the conclusion that they would be better just hacking postscript. In my experience this is not true. Even if you just hack yacc parser to give you infix and prefix notation for arithmetic operators, control structs and function calls the difference in readability and writability is quite amazing. I wrote such a parser in a couple of hours (and saved weeks of work therby.) If you add things like auto creation of local vars, named params, multiple assignment etc etc ad infinitum then postscript would become a positively appealing language to program in. (By the way, for those of you who are interested in the merits and demerits of the compiler approach, there is a discussion going on about this very subject in comp.lang.forth) I look forward with anticipation to the posting of PreScript. Regards, ==Fraser Orr ( Dept C.S., Univ. Glasgow, Glasgow, G12 8QQ, UK) UseNet: {uk}!cs.glasgow.ac.uk!orr JANET: orr@uk.ac.glasgow.cs ARPANet(preferred xAtlantic): orr%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk