Re: Why so few blank lines in Lisp?



I've noticed that many other languages have generous, and sometimes
copious, amounts of blank lines as part of their accepted/suggested
style.

Yet CL seems to be more terse in comparison. Is this because of the
functional nature, where most functions are smaller than in other
languages?

I put blank lines between paragraphs in an essay. Why have paragraphs
and blank lines at all? It allows you to mentally break the essay as a
whole up into smaller, easier-to-digest pieces. It also means, if you
have to walk away, that when you come back you can look for the
paragraph about some topic. None of these arguments make sense when the
essay is only five sentences long, so then I wouldn't use paragraphs
(or would only use one, depending on how you look at it). As you start
to deal with larger documents it makes sense to break it up further
into chapters and sections, perhaps giving each section a name.

Programs are the same way. The blank lines and other stylistic issues
are meant to make it easier to read. If my function is 5-10 lines long,
then it doesn't need to be broken up further. If a function is very
long, then for readability (and perhaps other reasons) I might break it
up into several smaller functions. As my programs get very large, I
might even break them up into separate files (chapters).

Out of curiosity, what particular language are you thinking of when you
say "many languages"? I don't generally get the impression that Lisp is
lacking in whitespace. In fact, it surprised me at first that Lisp
programmers would leave blank lines around a tiny defvar statement.

.



Relevant Pages

  • Re: MFC-DLL with CString as parameter?
    ... Note that there is a lot of demand to extend the lexical set of languages to include ... There is a wonderful essay, I forget who wrote it but it dates back to the early 1930s, ... we will probably have to have a GetProcAddressW call added. ...
    (microsoft.public.vc.mfc)
  • Re: Grauniad lives!
    ... paragraphs and sentences respectively. ... Apparently in other languages, local variants may appear. ... languages have an equivalent sentence that uses all the letters of the ... there examples that are widely known and used, like "the quick brown fox ... ...
    (uk.media.radio.archers)
  • Re: How to distinguish several

    ... In order to distinguish several paragraphs I have also created different ... I thought that I had better distinguish every <div> from the other... ... site in other languages. ... Write in peace for peace ...
    (alt.html)
  • Re: Joe and Harlan at the Movies
    ... > it's not something you can sum up in a few paragraphs. ... > fifteen page essay, because it covered a lot of time and permutations. ... Maybe a special event at the Nebula Awards weekend? ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Why choose a paragraph element for a paragraph?
    ... If it weren't for the sense that text is decomposable into paragraphs, there wouldn't be any motivation to *display* text in the form of visibly separate paragraphs. ... started spacing their text into chunks for no reason, and then started thinking of those chunks as something called paragraphs--and then decided to start using this chunking as a nifty way to structure their text, as long as they were doing it anyway? ... Kanji uses Chinese iconic characters and these are separated, and there are other additional things to make their writing useful. ... It does not follow that there is some abstract object between languages because one piece of work in one language can be translated into another language. ...
    (alt.html)

Loading