|
|
|
|
|
by emidln
3593 days ago
|
|
> adopt the idiotic "-p convention" which doesn't even really exist in Lisp any more. Do you have a better way of signaling to the reader that a function is a predicate? I don't write a ton of Common Lisp, but I do still see quite of a bit of foop when I read Common Lisp. Possible that most of the code I'm reading was written when this was still a thing though... I think the only reason this doesn't exist in Clojure (which is the lisp I used the most) is that ? is a valid identifier. Similarly Scheme includes ? as a valid identifier (at least R5RS as implemented by Chicken). |
|
http://www.lispworks.com/documentation/lw51/CLHS/Front/X_Per...
Scheme does use ?, and you can in CL if you really want. But CL reserves ? as a programmable reader macro [1]. It is often used, for example, to designate a stand-in domain variable designation in, say an embedded Prolog.
Another reason that CL avoids the "?" convention is that it's "unpronounceable" [2]. CL is the only language spec I've seen that discusses pronunciation; they actually gave thought to how programmers might converse about their code unambiguously [3]. Another manifestation of this is CL's sort-of case-insensitivity [4].
--
[1] The other reserved characters are !, [ ], and { }
[2] Although at least one wag suggested pronouncing it as "eh?", like a good Canadian.
[3] CLtL2 provides quite a bit of this. My fav is a brief excursion into how some hackers pronounce "macrolet" to rhyme with Chevrolet. :)
[4] This is not actually the case, but appears to be true to new Lispers, until they understand that by default, the reader converts everything to upcase.