If your code uses a lot of new utilities, some readers may complain
that it is hard to understand. People who are not yet very fluent in
Lisp will only be used to reading raw Lisp. In fact, they may not be
used to the idea of an extensible language at all. When they look at a
program which depends heavily on utilities, it may seem to them that
the author has, out of pure eccentricity, decided to write the program
in some sort of private language.
All these new operators, it might be argued, make the program harder
to read. One has to understand them all before being able to read the
program. To see why this kind of statement is mistaken, consider the
case described on page 41, in which we want to find the nearest
bookshops. If you wrote the program using find2, someone could
complain that they had to understand the definition of this new
utility before they could read your program. Well, suppose you hadn’t
used find2. Then, instead of having to understand the definition of
find2, the reader would have had to understand the definition of
find-books, in which the function of find2 is mixed up with the
specific task of finding bookshops. It is no more difficult to
understand find2 than find-books. And here we have only used the new
utility once. Utilities are meant to be used repeatedly. In a real
program, it might be a choice between having to understand find2, and
having to understand three or four specialized search routines. Surely
the former is easier.
So yes, reading a bottom-up program requires one to understand all the new
operators defined by the author. But this will nearly always be less work than
having to understand all the code that would have been required without them.
If people complain that using utilities makes your code hard to read,
they probably don’t realize what the code would look like if you
hadn’t used them. Bottom-up programming makes what would otherwise be
a large program look like a small, simple one. This can give the
impression that the program doesn’t do much, and should therefore be
easy to read. When inexperienced readers look closer and find that
this isn’t so, they react with dismay.
We find the same phenomenon in other fields: a well-designed machine
may have fewer parts, and yet look more complicated, because it is
packed into a smaller space. Bottom-up programs are conceptually
denser. It may take an effort to read them, but not as much as it
would take if they hadn’t been written that way.
I think bottom-up programming is great, but I have a bone to pick with that On Lisp quote.
"So yes, reading a bottom-up program requires one to understand all the new operators defined by the author. But this will nearly always be less work than having to understand all the code that would have been required without them."
Here's the problem: it's hard to build good abstractions. Every abstraction has a cost and an overhead in learning it, getting used to it, managing the cognitive overhead. The binary black-and-white phrasing of this argument utterly sidesteps any mention of the tradeoffs involved. Most abstractions we encounter in real-world code fail to take into account the cost of using an abstraction. You built it, you're used to it, you can't empathize with others who need to learn it.
There's even worse than abstractions that are used by their creator only: those that are not used by their creators at all.
I see that in my code all the time: my abstractions tend to suck until I use them myself, at which point I fix them.
The problem is, we often have to build abstractions that others will use before we use them ourselves. At that point we're kinda stuck, because the necessary changes will break code, and that's scary.
If your code uses a lot of new utilities, some readers may complain that it is hard to understand. People who are not yet very fluent in Lisp will only be used to reading raw Lisp. In fact, they may not be used to the idea of an extensible language at all. When they look at a program which depends heavily on utilities, it may seem to them that the author has, out of pure eccentricity, decided to write the program in some sort of private language.
All these new operators, it might be argued, make the program harder to read. One has to understand them all before being able to read the program. To see why this kind of statement is mistaken, consider the case described on page 41, in which we want to find the nearest bookshops. If you wrote the program using find2, someone could complain that they had to understand the definition of this new utility before they could read your program. Well, suppose you hadn’t used find2. Then, instead of having to understand the definition of find2, the reader would have had to understand the definition of find-books, in which the function of find2 is mixed up with the specific task of finding bookshops. It is no more difficult to understand find2 than find-books. And here we have only used the new utility once. Utilities are meant to be used repeatedly. In a real program, it might be a choice between having to understand find2, and having to understand three or four specialized search routines. Surely the former is easier.
So yes, reading a bottom-up program requires one to understand all the new operators defined by the author. But this will nearly always be less work than having to understand all the code that would have been required without them.
If people complain that using utilities makes your code hard to read, they probably don’t realize what the code would look like if you hadn’t used them. Bottom-up programming makes what would otherwise be a large program look like a small, simple one. This can give the impression that the program doesn’t do much, and should therefore be easy to read. When inexperienced readers look closer and find that this isn’t so, they react with dismay.
We find the same phenomenon in other fields: a well-designed machine may have fewer parts, and yet look more complicated, because it is packed into a smaller space. Bottom-up programs are conceptually denser. It may take an effort to read them, but not as much as it would take if they hadn’t been written that way.