pretty-printing (lose, lose) 
Author Message
 pretty-printing (lose, lose)

Quote:
> I find it difficult to believe that you would be unable to read your code
> with a prefix reader and pretty-print it with an infix pretty-printer

I've never seen a pretty printer that formatted code well enough.  
If people are regularly going to be translating from one format to
another, code quality will decline.

(BTW, the reason Emacs-style indenters work well enough is that the
programmer gets to pick the line breaks and, if necessary, adjust the
indentation as desired.)



Tue, 20 Feb 1996 02:17:33 GMT  
 pretty-printing (lose, lose)

Quote:
>> I find it difficult to believe that you would be unable to read your code
>> with a prefix reader and pretty-print it with an infix pretty-printer

>I've never seen a pretty printer that formatted code well enough.  
>If people are regularly going to be translating from one format to
>another, code quality will decline.

>(BTW, the reason Emacs-style indenters work well enough is that the
>programmer gets to pick the line breaks and, if necessary, adjust the
>indentation as desired.)

Have you looked at Waters' CL pretty printer?

-Ken



Tue, 20 Feb 1996 04:18:35 GMT  
 pretty-printing (lose, lose)
:> I find it difficult to believe that you would be unable to read your code
:> with a prefix reader and pretty-print it with an infix pretty-printer

:I've never seen a pretty printer that formatted code well enough.  
:If people are regularly going to be translating from one format to
:another, code quality will decline.

You must not be looking in the right places :-) The MPW (Macintosh
Programmer's Workshop) "PasMat" utility does a very good job with Pascal
code, the Unix utility "indent" can be made to do a good job with C
(though you do need to fiddle with the 1,000,000+ command-line
arguments), and there are any number of p-p's that can handle Scheme
and Lisp...

                                                        -- Scott

--
==============================================================================
"You know, it's 1984 all over again..."
                                      - Guy Kawasaki, when asked about Newton
==============================================================================



Tue, 20 Feb 1996 14:25:36 GMT  
 pretty-printing (lose, lose)

Quote:

> >I've never seen a pretty printer that formatted code well enough.  
> >If people are regularly going to be translating from one format to
> >another, code quality will decline.

> >(BTW, the reason Emacs-style indenters work well enough is that the
> >programmer gets to pick the line breaks and, if necessary, adjust the
> >indentation as desired.)

> Have you looked at Waters' CL pretty printer?

I've used it, and isn't it the pretty printer in Lucid?

Do you think it does an especially good job, or are you suggesting
it because it gives you lots of control over the output?

-- jeff



Tue, 20 Feb 1996 22:41:29 GMT  
 pretty-printing (lose, lose)

Quote:

> :> I find it difficult to believe that you would be unable to read your code
> :> with a prefix reader and pretty-print it with an infix pretty-printer

> :I've never seen a pretty printer that formatted code well enough.
> :If people are regularly going to be translating from one format to
> :another, code quality will decline.

> You must not be looking in the right places :-) The MPW (Macintosh
> Programmer's Workshop) "PasMat" utility does a very good job with Pascal
> code, the Unix utility "indent" can be made to do a good job with C
> (though you do need to fiddle with the 1,000,000+ command-line
> arguments), and there are any number of p-p's that can handle Scheme
> and Lisp...

I know there are a number of pretty-printers that can handle Scheme
and Lisp.  But I've never seen a pretty printer that formatted code
well enough.  When I first started using Lisp, pretty printers had
some better ideas than I did about code layout.  And if you look at
some of the things that used to be regarded as acceptable layout
(e.g. in the Lisp 1.5 book), you may be able to see what I mean
(though I wasn't that bad, having later in Lisp's history).  However,
I now know how to lay out code very well, as does the Lisp community
generally.  Pretty-printers follow pretty much the same rules BUT
they don't pick line breaks, or choose when to use less indentation
(as in, e.g., the so-called "miser format") as well as good
programmers do.

In the part of my message that you didn't quite, I pointed out
that the Emacs indenters work well because they let the programmer
pick the line breaks.  (And they preserve comments, of course.)
The Unix indent utility is similar (at least so far as I know,
but I don't use it much).

Now, I realize that some people love InterLisp-style systems in which
the "program is not the listing", etc.  But I don't, because they tend
to result in code that is significantly harder to read (at least for
people like me), especially if you are using a different system when
reading it.

-- jeff



Tue, 20 Feb 1996 23:01:54 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Lost Lib files - lost source

2. Print Button lose focus

3. Losing LPT1 as a Default Printing Device under NT

4. Pretty printing streams and *print-right-margin* modification

5. some lost porters are brave and other closed onions are sticky, but will Steven taste that

6. a bit lost

7. Lost all my old green cards

8. Lagoon Deployment loses Object>>#isSymbol

9. DBError after lost connection

10. Lost namespace

11. IKJEFT01 and (losing) APF authorization

12. Lost Messages

 

 
Powered by phpBB® Forum Software