lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feedback wanted: syntax highlighting in the LilyPond documentation


From: David Kastrup
Subject: Re: Feedback wanted: syntax highlighting in the LilyPond documentation
Date: Tue, 04 Jan 2022 15:48:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

J Martin Rushton <martinrushton56@btinternet.com> writes:

> Interesting Aaron, but I do note that the paper is from 1983 and didn't
> catch on.  I wonder if there is a reason for that?  I've saved the
> paper to read later.  Personally I don't know of a single language that
> is happy with word processor output as source code, but then I may be
> proved wrong.  Knuth seems to be addressing issues that have been
> effectively bypassed by the rise of object orientated code.  I was
> trained in a macro assembler (VAX-Macro) and am well aware of their
> advantage for repeated idioms, but if they are just another layer on
> the top they can merely double the size of the language to master.
>
> In passing, although Knuth uses variable width fonts in the first six
> pages, I note that as soon as he starts to give firm code on page 7
> onwards he uses fixed width!

Uh, you are talking about "D. HOW THE EXAMPLE WAS SPECIFIED" which
displays the macros used for typesetting the Literate Programming
example.

That's sort of like complaining that someone lauding some computer
language bootstraps his compiler from a different system.

Knuth has written both TeX and METAFONT entirely in his WEB programming
system for Literate Programming.  I have the printed book for TeX.

>
> On Tue, 2022-01-04 at 05:10 -0800, Aaron Hill wrote:
>> On 2022-01-04 4:19 am, J Martin Rushton wrote:
>> > Sorry to disagree, but fixed pitch is _so_ much easier to lay out
>> > in an
>> > editor.  Documentation flows nicely with variable pitch and fancy
>> > hidden formats, but for code (and Lily's input is a programming
>> > language) you just want the plain line-by-line ASCII.  It is, as
>> > you
>> > say, industry standard; and that is for a good reason.
>> 
>> As a counterpoint, Knuth's work with literate programming [1] showed
>> it 
>> was possible to have typographically beautiful setting of code for
>> use 
>> in print.  His style largely used proportional fonts though some 
>> elements were still rendered in fixed width to provide useful
>> contrast.  
>> While Knuth's approach is not perfect for every language, I argue
>> the 
>> vast majority of programming books out there really should have
>> followed 
>> suit.  Editors (the people, not programs) seem to struggle with 
>> fixed-width typefaces, and typos were abundant.
>> 
>> Going beyond printed documentation, some IDEs like Source Insight 
>> enabled and encouraged programmers to use proportional fonts, where 
>> horizontal alignment was something handled by the system not the 
>> programmer.  Though I do concede this was probably a novelty, seeing
>> as 
>> these days terminals and editors still rely on fixed pitch.
>> 
>> [1]: http://www.literateprogramming.com/knuthweb.pdf
>> 
>> 
>> -- Aaron Hill

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]