defgeneric expects a generic-function-lambda-list, not a specialized-lambda-list!

Pascal J.Bourguignon <[email protected]> Fri, 4 Feb 2005 17:05:34 +0100 (CET)
Newsgroups gmane.lisp.cclan.bugs
Organization InformatiMago.
Message-ID <[email protected]>
In cclan-get.lisp:

(defgeneric download-file ((repository repository) pathname)
  (:documentation
   "Download a file to (suggested) local file PATHNAME.  Name and type of
pathname are used to find the file in the remote REPOSITORY.  Return a va=
lid
pathname on success, or NIL if the file could not be found."))

This is wrong, CLHS forbid the use of specialized-lambda-list in
DEFGENERIC:

http://www.lispworks.com/reference/HyperSpec/Body/m_defgen.htm#defgeneric

  Macro DEFGENERIC

  Syntax:

  defgeneric function-name gf-lambda-list [[option | {method-description}=
*]]
                           ^^^^^^^^^^^^^^
  gf-lambda-list---a generic function lambda list.
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

and the syntax for generic function lambda list prevents the specializati=
on:


http://www.lispworks.com/reference/HyperSpec/Body/03_db.htm

  A generic function lambda list has the following syntax:

  lambda-list::=3D (var*=20
                  [&optional {var | (var)}*]=20
                  [&rest var]=20
                  [&key {var | ({var | (keyword-name var)})}*=20
                                [&allow-other-keys]])=20


Please, correct all defgeneric uses, removing the specializations:

(defgeneric download-file (repository pathname)
  (:documentation
   "Download a file to (suggested) local file PATHNAME.  Name and type of
pathname are used to find the file in the remote REPOSITORY.  Return a va=
lid
pathname on success, or NIL if the file could not be found."))


--=20
__Pascal Bourguignon__                     http://www.informatimago.com/

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick