Xref: utzoo comp.unix.internals:2670 comp.windows.news:2584 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!bu.edu!snorkelwacker.mit.edu!usc!samsung!uakari.primate.wisc.edu!crdgw1!barnett From: barnett@grymoire.crd.ge.com (Bruce Barnett) Newsgroups: comp.unix.internals,comp.windows.news Subject: Re: X11 bashing Message-ID: Date: 26 Apr 91 14:32:40 GMT References: <28063@uflorida.cis.ufl.EDU> > <12231@exodus.Eng.Sun.COM> Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.ge.com Followup-To: comp.unix.internals Organization: GE Corp. R & D, Schenectady, NY Lines: 44 In article <12231@exodus.Eng.Sun.COM> rberlin@birdlandEng.Sun.COM (Rich Berlin) writes: > You could always define a couple of postscript "commands" which do > nothing, e.g. > > /|- {} def > /-| {} def > > and then mark things like this: > > |- 100 50 8 [1 0 0 -1 0 900] {<00>} false 3 -| colorimage Yeah - that's what I was thinking of. But would everyone use it? There would need to be a large number of tools to make this popular. Like - positioning the mouse on the first bracket and hitting a command key that executes the commands within the bracket. (Like lisp). And having double/triple clicks expand fill the brackets. Then drag, copy and drop the code from one routine into another, call up a parser to check for the proper number of parameters. (e.g. selected text takes two parameters as input and generates 3 items on the stack.) You would also need some code to read a PostScript/NeWS program and generate the proper nesting of brackets. Now there's an interesting idea! This would tell you which commands consumed data, and which ones generated data. It would indicate nesting depth, and might go a long way to making NeWS easier to use. Let's extend the syntax a little. Maybe |- is a bracket indicating there is the same number of operates on the stack as the matching -|. If you have a procedure that takes three parameters, and consumes them all, use a different character. Perhaps |+++ to go with -|? > You mentioned in an earlier message that you'd prefer prefix notation, I wouldn't say it's the prefix part that is important. It's the clear indication of data flow that I like so much, and vanilla PostScript lacks. If NeWS was extended to have this sort of "syntactic sugar" without penalty, and the tools were added to make this usage desirable, it might be easier for people to pick up a random piece of code and follow it without memorizing AHEAD OF TIME the input/output of every procedure/command used. -- Bruce G. Barnett barnett@crdgw1.ge.com uunet!crdgw1!barnett