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

Unable to deliver letter



Unable to deliver letter to the following recipient:
  gls%Aquinas@THINK: Host not responding.

----- Text of letter follows -----
Received: from CHICOPEE.SCRC.Symbolics.COM by SCRC-QUABBIN.ARPA via CHAOS with CHAOS-MAIL id 172966; Tue 18-Jun-85 11:56:52-EDT
Date: Tue, 18 Jun 85 11:57 EDT
From: Daniel L. Weinreb <DLW@SCRC-QUABBIN.ARPA>
Subject: [TYSON@SRI-AI.ARPA: APPEND in Common-LISP]
To: gls%Aquinas@THINK.ARPA
Message-ID: <850618115747.0.DLW@CHICOPEE.SCRC.Symbolics.COM>
Fonts: CPTFONT, CPTFONTB, CPTFONTI
Reply-To: dlw@SCRC-STONY-BROOK.ARPA

This message shows a slight confusion from the wording of APPEND's
documentation.  My understanding is that what Symbolics CL does is
correct, and the manual faked Mabry out by making him think that "APPEND
always returns a list" is always true for all valid arguments.  Maybe
the wording can be made a bit more explicit in the next revision.

Date: Mon, 17 Jun 85 20:58 PDT
From: Mabry Tyson <TYSON@SRI-AI.ARPA>
Subject: APPEND in Common-LISP
To: dlw@SCRC-STONY-BROOK.ARPA
Fcc: B:>tyson>mail>MYMAIL.mail
Message-ID: <850617205802.3.TYSON@BISHOP.ARPA>

I was going to write a longish message about how APPEND had problems
with a single atomic argument and dotted lists as arguments but I
finally realized CL gets out of it via the statement that its arguments
are lists and thus are presumed to be true lists...  If you don't pass
it the expected arguments, anything may happen with perhaps no error
message.

So, while the argument list specifies "lists" which must be presumed to
be true lists (since it can be interpreted differently if passed dotted
lists) but it gleefully returns "lists" which specifically may be dotted
lists.  (At least two interpretations are available: cause an error or
ignore the non-list cdr -- ie, ignore the fact the user passed illegal
arguments.)

I still object to the fact, in SCL, that (APPEND 'A) = A though!  At
least that one ought to get an error message.  Hmmmm...  This one may be
a legal call to APPEND (since "The last argument actually need not be a
list..") but it does not return a list ("The result is a list ...").  At
least one version of PSL returns NIL for (APPEND 'A) {It ignores the
non-list first argument as though it had just CDRed down to it.  Then it
takes the second arg (NIL) as the value.}   So, is (APPEND 'A) a legal
call to append and the "The result is a list..." is invalid?

At least UCILisp, or at least the version from Texas, was careful with
such things!  I feel that programmers tend to err here and need some
protection.  Maybe someday we will have a super-safe version of CL that
will do such error checking.