[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more misc. stuff



More nits.

[4, continued] Note that there was nothing special about MACROLET as
opposed to DEFMACRO or MACRO in my previous message.  The following is just
as confusing as the MACROLET example (remember that Common Lisp has lexical
closures).

	(let ((x 5))
	  (defmacro foo (z) `(+ ,z ,x))
	  (foo 7))

Also, what about the following:

	(flet ((foo (z) z))
	  (defmacro foo (z) `(+ ,z ,x))
	  (foo 7))

Does the DEFMACRO alter the global function binding of FOO or the local
function binding?

[8] Page 77: be careful about the use of the term "predicate".  It has
"traditionally" been used in two different ways - to mean a function
which returns a truth value, and to mean an expression which computes a
truth value.  The CL manual elsewhere suggests the term "test" for the
second concept.  So in the descriptions of IF, WHEN, and UNLESS, use
"test" instead of "pred" to name the test form.

[9] On naming of predicates: maybe there should be an explanation
somewhere of how it is that some predicates are named with a "P" suffix,
and others with a "-P" suffix.  E.g.:

	input-stream-p
	compiled-function-p
	simple-string-p
	macro-p
but
	streamp
	functionp
	string-charp
	stringp
	characterp
	zerop
	char-greaterp
	uppercasep

What's the general rule?  I have a feeling there almost is one.
-------