Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!husc6!lloyd!kent From: kent@lloyd.camex.uucp (Kent Borg) Newsgroups: comp.sys.mac Subject: LightSpeed Pascal pretty-printing Summary: It's a feature--really. Keywords: parse token pretty printing Lightspeed Pascal LSP incremental compiler Message-ID: <244@lloyd.camex.uucp> Date: 3 Nov 88 15:41:46 GMT References: <1151@usfvax2.EDU> Reply-To: kent@lloyd.UUCP (Kent Borg) Organization: Camex, Inc., Boston, Mass USA Lines: 54 In article <1151@usfvax2.EDU> pollock@usfvax2.UUCP (Wayne Pollock) writes: >Below is a LSP program (re-pretty-printed to save screen space; why oh why >can't I turn this option off?). ... Because it is not an `option'. Rich explained this a while back. What I remember: One of the reasons LSP has such a fast turn around is that when you say `Compile' a lot of (all of?) the parsing of your program is already done, it happened when you typed the `;' for that line. The compiler is storing your program in some tight, tokenized, internal form. This has the natural side effect striping out formatting information that the compiler has no use for. Remember back when you were playing around with interpreted BASIC? You typed in `print' (or `?') but the listing said `PRINT'. Similar effect. Certainly the pretty printing could be avoided without loosing the fast turn around and source code debugging LSP does so very well, but I can see how these changes would be far from trivial and not without cost in time and space. That coupled with idea that pretty-printing might be a _feature_ helps explain why it is the way it is. LSP 2.0 is supposed to allow the user lots of opportunity to twiddle the pretty printing parameters--but it is still part of the product. Personally, though I like the pretty printing, I do have some gripes: It will sometimes `kidnap' an end statement from old code when I am adding new code, leaving me unbalanced (more than usual I mean). In this case it is looking at my work too soon. On the other side it is sometimes hard to get it to reconsider a line once I have fixed a typo. This was a particular problem for a class I recently taught at the Boston Computer Society where LSP was used for examples. Students would have a perfectly fine Pascal statement sitting on the screen, but the editor was still upset over an earlier typo. In this case it is looking at our work too late. This incremental stuff is complicated, and when I think about it, I am impressed with how gracefully they do it. Further consideration for all you grumblers: LSP is great and there are ways they could make it still better. Getting rid of the pretty printing will not be trivial. Do you really want them to take time away from making substantial improvements just to fix this? Wouldn't you rather get inline assembly code, or something else that actually adds power to the product? If so, say so, and don't complain so much. (Personal LSP request: Editor support of arrow keys, option arrow keys, command arrow keys, shift option arrow keys, etc.) Kent Borg kent@lloyd.uucp or hscfvax!lloyd!kent