[plt-scheme] Request for pretty-printing in webserver

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Apr 2 03:29:42 EST 2003

On Apr  2, MJ Ray wrote:
> Eli Barzilay <eli at barzilay.org> wrote:
> > But this is whitespace in the output which doesn't matter for the HTML
> > semantics, which should be pretty much automatic for easy viewing and
> > debugging.  If you want your specific style, then it is always
> > possible to override the defaults:
> But what should the default be?

It doesn't matter as long as it is human readable and editable and
renders the same.  It only matters when you care for how the output
souce looks, and such cases should be pretty rare.

> I think that's part of the disagreement here.  The webserver assumes
> that you are producing XML by default, and that whitespace matters.

All this is irrelevant for a webserver.

> > Yes -- to generate pretty output, you just do some more work on
> > your output routine.  To have a pp pipe, means that you need to
> > parse the html which is *much* more work.
> ...but a solved problem with things like HtmlPrag or even Tidy?

Do you really think that having a webserver that generates xml data
which is then rendered onto a pipe which is then parsed back to xml
data which is then rerendered as a different form of text makes sense?
This is a bad solution which should not happen when you have a
language that can easily have an output function as a parameter that
you can customize.

> > Definitely -- in the world of non-programmers it is difficult to
> > convince people to use your tools, having a human readable and
> > editable output is important enough that some of the current users of
> > my thing would not use it otherwise.  [...]
> So it's good for advertising on the distribution site,

Not advertising -- these people would just not use it.

> but again I think all we have here is a difference of opinion about
> whether webserver defaults to xml or html semantics when outputting,
> or whether compact or pretty code should be output for the html.

I've completely lost you here.  This is completely unrelated to
webservers or xml/html.

> I'm not sure all commercial packages produce terrible code.  Most
> do.

I didn't intend to generalize on all, since I didn't see all.  Its
just that I never saw any commercial web publisher generate good html

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.