Re: Why so few blank lines in Lisp?
- From: "Eric Lavigne" <lavigne.eric@xxxxxxxxx>
- Date: 21 Feb 2006 14:59:01 -0800
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.
.
- References:
- Why so few blank lines in Lisp?
- From: Jonathon McKitrick
- Why so few blank lines in Lisp?
- Prev by Date: Re: Why so few blank lines in Lisp?
- Next by Date: McCLIM performance
- Previous by thread: Re: Why so few blank lines in Lisp?
- Next by thread: Re: Why so few blank lines in Lisp?
- Index(es):
Loading