top | item 29849996

The One True Lisp Style Guide

2 points| metacontent | 4 years ago |github.com

3 comments

order

metacontent|4 years ago

Would the results of trying to find agreement between a number of different Lisp style guides be useful or interesting to anyone other than myself?

daly|4 years ago

50 year lisper here with my style guide...

( thing thing ... thing )

daly|4 years ago

Actually, that's no longer true for me, now that I think about it.

All of my code is now written as a literate program. I never write naked code anymore.

Thus my "lisp" files are actually latex and read:

\documentclass{book}

\begin{document}

words.....

\begin{chunk}{somelabel}

( thing thing ... thing )

\end{chunk}

\end{document}

------------------------------------------------------

To quote Knuth: (http://www.literateprogramming.com/)

I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming."

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.

The practitioner of literate programming can be regarded as an essayist, whose main concern is with exposition and excellence of style. Such an author, with thesaurus in hand, chooses the names of variables carefully and explains what each variable means. He or she strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.