help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Quote by Knuth


From: tomas
Subject: Re: Quote by Knuth
Date: Mon, 19 Jul 2021 09:07:07 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jul 19, 2021 at 12:14:18AM +0200, Emanuel Berg via Users list for the 
GNU Emacs text editor wrote:
> Christopher Dimech wrote:
> 
> > Literate programming is an enhanced macro substitution
> > package tuned to the task of rearranging source code.
> 
> We know what a macro is but what is literate programming
> except it relies on macros? Does it rely to macros MORE than
> everyday programming, including programming that uses macros,
> or are the macros CLOSER to natural languages, maybe?

This discussion is so full of category errors that it's difficult
to say anything relevant anymore. Let me pick two senses for
the term "literate programming":

"Literate programming" is a pretty generic term. The most you
can say about it is that it tries to combine "writing for humans"
("literature") and "writing for machines" ("programming"). Talking
about macros in this context would be a category error [0] like
saying "Colorless green ideas sleep furiously".

"Literate programming" as coined by Knuth (no, Mr. Dimech, you
probably won't be interested -- for me, you can't overstate Knuth
too much) is /technically/ based on WEB, which is a text substitution
system, so can be regarded as a macro [1] system. If you look closely,
TeX [2] and METAFONT [3] are "text substitution systems" a.k.a.
macro [4] expanders.

It was the rage among some computer scientists of that time (1980s),
and Donald Knuth seems to have been interested in them back then.

So yes, in the second, strict, sense macros do play a role. By the
way, and to try to put things on-topic (hope? HAH!), noweb is also
a text expansion machinery, inspired... yes, on Knuth's WEB. Go
figure.

Cheers

[0] https://en.wikipedia.org/wiki/Category_error
[1] https://en.wikipedia.org/wiki/WEB
[2] https://en.wikipedia.org/wiki/TeX
[3] https://en.wikipedia.org/wiki/METAFONT

 - tomás

Attachment: signature.asc
Description: Digital signature


reply via email to

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