| Deutsch English Français Italiano |
|
<87bjsv3wh6.fsf@lispclub.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Daniel Cerqueira <dan.list@lispclub.com>
Newsgroups: comp.lang.lisp
Subject: McCarthy's eval correction?
Date: Thu, 17 Apr 2025 11:37:09 +0100
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <87bjsv3wh6.fsf@lispclub.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
micalg=pgp-sha512; protocol="application/pgp-signature"
Injection-Date: Thu, 17 Apr 2025 12:37:17 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="00866462b846148d3bb635a3e0a15abe";
logging-data="455244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AuvSoXTt3HMWLtEo91sdKR+e7/2RlJ/c="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:BQvSdt43nJJQhLNCXeXnABeGKoI=
sha1:9+8WmmjbzL0Rz0pfrF/o61G15qs=
Content-Language: en
OpenPGP: id=0x964FC110C40AD575; url="https://openpgpkey.lispclub.com/.well-known/openpgpkey/lispclub.com/hu/wwhaoe1fy5idwyj4xx847eqerems5rwb?l=dan.list"; preference=signencrypt
Bytes: 3068
--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
In trying to understand McCarthy's eval, I have one question left
unresolved. Let me give a code snippet of eval, which is written in
Common Lisp, taken from Paul Graham's draft.
```
(defun eval. (e a)
(cond
...
((eq (caar e) 'label)
(eval. (cons (caddar e) (cdr e))
(cons (list (cadar e) (car e)) a)))
...
))
```
I wonder what practical difference does it make to, instead, write eval
like this:
```
(defun eval. (e a)
(cond
...
((eq (caar e) 'label)
(eval. (cons (caddar e) (cdr e))
(cons (list (cadar e) (caddar e)) a)))
...
))
```
Anyone?
In my opinion, it makes no practical difference, and this correction
avoids unnecessary double processing.
=2D-=20
The pioneers of a warless world are the youth that
refuse military service. ~ Albert Einstein
--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQJKBAEBCgA0FiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmgA2dYWHGRhbi5saXN0
QGxpc3BjbHViLmNvbQAKCRCWT8EQxArVdYdcEACSJPFRTyAfhVTSBICOE3F2tvR8
jdKK11ylA46GDIgFUx2BHojapLjKSciLSy/4fMvJCzws8sUDcu3fZmdt/VXGSAoa
ToJOJEK0XbfNuPfU9MCTyygNeBJQlCXv5XDkwpRU8w+kRFPgzVod92jqXbYr1Fqy
0wkj9c5Fg4GgswMx/U5ECWxCuJeQS4O3TXBY6Nakq14gXktykc4VyzkSjV7wQ5Rs
3ygrnxZiZRdFifK5v766eNBMaxTNOWE3uw4CVxU0h9Wsk9dOQ+/YINKszCBFdwhS
XCJ87vPTosD6hTG84T2fJfrFJZxryxSuKaUFjTvFSCRPd0BHW/L6ZOftn18izMYb
cAWFrAQMyDS+vH44+WuyVOfbT2/sftmcq96Qk22M0g3k6/2jXZbVPhK80bD/0MQM
19VgEDuGJm3o8npgruu+HbyoWDpFtsyLgHwe0VM4npxHfs7fIQWelBakYOt8pR+t
x2wh6zgjvkg/Tsm1ECLWjKUXSlX5v9xOE07CXui19Yi+/tR2mZJW//8oK1DW9M3y
wWrrWEyacHNYET8g0yKdonNqKt54Wzm0CfKxzeglNuDbgBc+VsedNzPlCWmOrjwr
koXRece9tOgAF66YOMnCdT0nKecbmuRFE2Xi6rjU497z1sRz6Y/m1f3UERxqKG7r
vWOMcfTKWUYkrPH8Bw==
=gmE/
-----END PGP SIGNATURE-----
--=-=-=--