Hi,

Am 23.12.2008 um 17:10 schrieb J. McConnell:

This was my intuitive guess as well. However, looking at condp, it
seems that Rich prefers (at least in that case) option 2 (note the (=
0 n) clause in the cond expression):

No. This case is different. The exception is part of
the runtime: if no condp clause triggered and there
is no default clause supplied, the exception is thrown.
This has nothing todo with providing wrong inputs to
the macro.

Consider these examples:

(condp = 5
  1 "a one"
  2 "a two")

This will throw an exception at runtime, that no
clause was triggered.

(condp = 5
  1 "a one"
  2 "a two"
  "something else")

This will return "something else" as default.

(condp = 1
  1 :>>)

This would be an example of invalid input, since the
result-expr is not provided and hence is nil in the macro
expansion. Hence this will trigger a NullPointerException
at runtime. Such a case could be caught at compile
time.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to