Some printers didn't have question marks, so we used a capital P, instead.
Some didn't even have a space character, or world trim them out, so a lowercase b (for "blank") with a / on top of it would represent a space.
Some printers didn't have question marks, so we used a capital P, instead.
Some didn't even have a space character, or world trim them out, so a lowercase b (for "blank") with a / on top of it would represent a space.
Or just, like thisP
But text was precious, so questions were often condensed into one word.
"Do you want to get pizza?" Became simply "PizzaP"
(LABEL, SUBST, (LAMBDA, (X, Y, Z), (COND ((ATOM, Z),
(COND,(EQ, Y, Z), X), ((QUOTE, T), Z))), ((QUOTE, T), (CONS,
(SUBST, X, Y,(CAR Z)), (SUBST, X, Y, (CDR, Z)))))))
This notation is writable and somewhat readable. It can be
made easier to read and write at the cost of making its
structure less regular. If more characters were available
on the computer, it could be improved considerably.[4]
----
[4] 1995: More characters were made available on SAIL and
later on the Lisp machines.Alas, the world went back to
inferior character sets again—though not as far back as
when this paper was written in early 1959
So at the very least, some of the syntactic conventions of LISP were mostly due to limited character sets at the time.Trying to binary search through history to figure out when the -p convention was introduced, I checked the original Scheme paper (https://web.archive.org/web/20171201033214/http://repository...), which has some examples in Scheme as well as implementation code in MacLISP. It looks like the predicate convention wasn't really strongly established at that point; in a few places, they use variables with a trailing `?` in the Scheme code, but I don't see any use of a predicate convention in the MacLISP implementation code.
Going back a bit, I do see the predicate convention mentioned in an Interlisp manual from 1974, but without an explanation of its origin (http://bitsavers.trailing-edge.com/pdf/xerox/interlisp/Inter...).
A MacLISP manual from the same year also mentions the -p convention, but not its origins. So looks like it had been firmly established by 1974: http://www.softwarepreservation.org/projects/LISP/MIT/Moon-M...
Going back further, the LISP 1.5 manual (second edition, 1965, though the printing was from 1979) has a number of numeric predicates with the -p suffix, but it does not make note of the suffix convention (https://archive.org/details/lisp15programmer00john/page/26/m... , free registration required). It does use a lot of language discussing "predicate" and use the term "p position of a conditional expression" (https://archive.org/details/lisp15programmer00john/page/22/m...), so the use of "p" for "predicate" rather than "?" seems to be somewhat well established. LISP 1.5 had a very restrictive syntax for identifiers, they were just alphanumeric.
So, I'm going to say that while it's possible that the usage of P for this purpose comes from substitutiong P for ?, all of the sources I've found seem to indicate that it stands for "predicate."
It's interesting the creativity (like all art) that comes out when limitations and obstacles are met.