[m-rev.] For revew: a new, improved pretty printer

Mark Brown mark at csse.unimelb.edu.au
Wed Aug 1 18:35:13 AEST 2007


On 01-Aug-2007, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> Zoltan Somogyi, Wednesday,  1 August 2007:
> > On 01-Aug-2007, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> > > +:- type doc
> > > +    --->    s(string)                   % Output a literal string.  Strings
> > > +                                        %   containing newlines, hard
> > > +                                        %   tabs, etc. will lead to strange
> > > +                                        %   output.
> > > +    ;       nl                          % Output a newline if the enclosing
> > > +                                        %   group does not fit on the current
> > > +                                        %   line.
> > 
> > I think the documentation would be much easier to read (and to write)
> > in this style:
> > 
> >        ;        nl
> >        		% Output a newline if the enclosing group does not fit
> > 		% on the current line.
> 
> Hmm, in this case I prefer the style I've used.  Anybody want to cast a
> tie-breaking vote?

Zoltan convinced me a while ago that the style he advocates here is the best.
It makes better use of screen real estate, and it keeps the start of the
comment close to the start of the thing it is commenting on so the two are
more obviously connected.

Cheers,
Mark.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list