On Thu, 13 Aug 2009 09:14:19 GMT
"Aaron W. Hsu" <arcf...@sacrideo.us> wrote:

> So, I was browsing around the other day looking at Acme resources, and I  
> discovered an old post from 1995 wherein someone advocated the use of  
> proportional fonts for programming in Acme. This surprised me, to say the  
> least. He even went as far as to mention that SML was the language they  
> were using, and had managed to get a decent indenting pattern for it that  
> was just as readable, without messing things up for proportional font  
> users.
> 
> I have to admit that I'm a bit skeptical about whether such a technique  
> actually works, and so, I thought I would pose some questions to you.
> 
> Firstly, how many of you using Acme for programming on a daily basis remap  
> your fonts so that the fixed width font is the main one that you use?
> 
> Secondly, if you do use proportional width fonts, why, and what troubles  
> did you encounter; what benefits did you encounter?

I don't program on a daily basis, but using a proportional font in rio
I'm finding it so much easier on the eyes that I hold back from opening
xterms and from switching acme windows into the fixed-width font.

> 
> Thirdly, would you continue using proportional width fonts in cases like  
> Lisp code, where you very often see something like the following  
> indentation scheme, and how would you resolve these indentation problems  
> with proportional width fonts if you did continue to use them?
> 
>       (let ([foo bar]
>             [something else])
>         (some-func (called again)
>                       (with fun indentation)
>              (and yet)
>              (another)))

This particular form of indentation is the only thing I'd be worried
about, and where a great deal of nesting is not required it's never
strictly necessary. In a certain scripting environment with a C-like
syntax and a very weak editor I got into the habit of treating parentheses
as block structure when the parameter list is long:

    llSetPrimitiveParams([
            PRIM_TYPE, PRIM_TYPE_CYLINDER, 0,
            <open_cut_start, open_cut_end, 0>, hollow,
            <0, 0, 0>, <1, 1, 0>, <0, 0, 0>
    ]);

That's not a practical style in Lisp, of course. I've thought about
this in the past as I was never entirely comfortable with some very
common indenting styles. Gnu style has 2-character indents, that's not
an indent, it's natural roughness! The Linux kernel style on the other
hand has full tabs. 8-character tabs break things up a little too much
for my eyes so I set my editor to have narrower tabs when loading code
from the kernel tree. This worked great so long as no code had a special
indent (as Aaron's Lisp code above) nor was aligned after the indent
(e.g. comments on the same line as code). This eventually led me to
consider an editor which dynamically managed indents, displaying the
code quite differently to the fixed indents in the source file. Such an
editor could work well with proportional fonts and s-expressions together,
but I can't work out whether it would be 'too clever' - i.e. irritating.


-- 
Ethan Grammatikidis

Those who are slower at parsing information must
necessarily be faster at problem-solving.

Reply via email to