Ar an cúigiú lá is fiche de mí Eanair, scríobh Stephen J. Turnbull:
QUERY
I don't see a real use case for the return value of Fclrhash, and I
find it hard to imagine one.
http://www.lispworks.com/documentation/HyperSpec/Body/f_clrhas.htm#clrhash
It’s available in Common Lisp. I don’t see any win to being incompatible
with Common Lisp in this, and if we’re going to be compatible, we may as
well document it.
Ugh, though, GNU always return nil. Maybe I can submit a bug report to them.
I think it's preferable to *not* document the return value of
functions
that are only useful for their side effects. Mike?
In the case of puthash, there's an obvious theoretical use, in fact
two of them:
(setq would-this-want-key-or-value?
(puthash (complex-expr-1) (complex-expr-2) hash-table))
Is it obvious that returning VALUE is the right thing? What Would
Common Lisp Do?
It would use #'setf instead--that’s what the hyperspec describes, and the
implementation at telnet
prompt.franz.com tells me that puthash isn’t bound.
GNU return VALUE, but don’t document it.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches