Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-01-04 17:58:00


From: "Kevlin Henney" <Kevlin.Henney_at_[hidden]>

> Hmm, I guess I'm something of a traditionalist when it comes to this:
fixed
> width fonts just seem to consistently cause fewer problems... and besides,
> <ignite>the code just looks _right_, if you know what I mean</ignite> ;->.
>
> But seriously, I'm not really convinced by real estate savings when other
> more fundamental issues seem to interfere with readability, such as the
raw
> deal that narrow letters such as 'i' and 'l' get, and the fact that many
> comments and much indentation is based on fixed space assumptions.
>
> As fixed width is the default on probably the majority of editors, command
> lines, etc that programmers use, that seems to make a case for making it
> the default for the tool.

I sense a religious war brewing. More accurately, I think we are entering
one that is already in full bloom. I'm the only bozo where I work that
likes proportional fonts. Everyone else here thinks I'm crazy. It all
comes down to a matter of personal taste, since there are advantages each
way, and how heavily each pro and con factors in depends on the
brain-workings of the reader.

Fortunately, in this case we aren't necessarily stuck with a single
"religion". Enter cascading style sheets (CSS). For starters, instead of
saying:

<FONT FACE="Arial">// Some comment</FONT>
you say:
<SPAN CLASS="Comment">// Some comment</SPAN>

and in the beginning of the file (or in another file), you say:

.Comment {
    font-family: sans-serif;
    color: green;
}

The neat part is that the user can specify a style sheet override (for IE5
via Internet Options -> General -> Accessibility -> User style sheet). For
example:

.Comment {
    font-family: monospace;
}

This way there can be one boost default, but each user can customize if
desired.

One caveat about cascading style sheets: As much as we complain about
compiler nonconformance of C++, it all pales in comparison to
non-conformance of interpreting CSS, especially with Netscape. However, as
long as we stick to the simple stuff, we should be OK.

To take this one step further, it should be possible to use dynamic HTML to
put a couple of buttons on the upper-right of the HTML page that quickly
choose between common font combinations, but the details of this are beyond
me and maybe not worth the effort. Of course, even better would be to use
XML, but general browser support just isn't there yet.

I'm willing to help out with modifying the awk script if there is interest
in using CSS.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk