greid@ondine.COM (Glenn Reid) (09/22/88)
> My argument, which applies to interpretive languages in general, is > that it's easier to learn a language in an interactive programming > environment than in a batch environment. Direct access and immediate > feedback gives a programmer immersed in an interpretive environment > intimate experience with the language, and incentive to experiment. > PostScript is very different than the languages most people are used > to. The syntax of PostScript is extremely simple, but if you're ever > going to be able to harness its power, you've got to understand the > semantics. And playing around with an interactive interpreter is a > quick and fun way to find out how it works. > -Don I would say that there are several levels of becoming proficient with the PostScripot language, and that (at least at the beginning), it can be very helpful to have some interactive response so you can test things out. However, once you get past a pretty simplistic level, you get very tired of retyping a line of code because you got it wrong: PS> /Times-Roman fondfont 12 scalefont setfont %%[Error: undefined; OffendingCommand: fondfont]%% PS> /Times-Roman findfont 12 scalefont setfont PS> (Hello world!) show %%[Error: nocurrentpoint; OffendingCommand: show]%% PS> 0 0 moveto (:LSJDFLKJSF) show This is about where you put the whole thing into a file, and do this instead: PS> (myprog.ps) run Which gets you back into batch mode, sort of.... The final point that is forgotten is that you can use a printer in interactive mode, which, although it is not as visual (without wasting a bit of paper), at least lets you get a "feel" for the language. I do this all the time to examine some part of my program to see what sequence of operators is necessary to pluck something from an array or whether "putinverval" really works like I think it does. A PostScript printer, after all, is just a computer with a serial port, to which you hook up a terminal (or emulator), just like the old days :-) You still have to type "executive", of course. Cheers, Glenn Reid Adobe Systems
toms@ncifcrf.gov (Tom Schneider) (09/22/88)
In article <4227@adobe.COM> greid@adobe.UUCP (Glenn Reid) writes: >However, once you get past a pretty simplistic level, you get >very tired of retyping a line of code because you got it wrong: >... >This is about where you put the whole thing into a file, and do this >instead: >... >Which gets you back into batch mode, sort of.... Nope! I had two windows open. In one I had my editor, and I modified the code there. In the other window I ran psh. Then I could play by stuffing things from one window to the other (there might be an easier way to do this with a smarter editor like gemacs). So I could try out all kinds of things VERY quickly, which is the whole point of this discussion; to learn something it is best to be able to play around with it. So waiting around for the printer to print is no good... (I've assumed, for the purposes of this discussion, that a person has a choice between talking to the NeWS server via psh or to a printer. With no choice, either would be great.) Try this two window trick! Once you are set up, its great for testing all those neat \bells&whistles. And you end up with permanant code in a file if you want... Tom Schneider toms@ncifcrf.gov