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

Re: Check-keyword-arguments

     Date: 12 May 88  0838 PDT
     From: Dick Gabriel <RPG@SAIL.STANFORD.EDU>
     Subject: Check-keyword-arguments   
     Here is another approach. I believe we need to have a procedural
     definition of make-instance (and maybe other initialization-like
     functions), and we need for them to be models for users to imitate.
     Therefore, the error situation must be handled correctly in make-instance.
     Because check-keyword-arguments is pretty ugly already, why not simply
     make it do what it needs to do (and maybe some useful but not required
     things too)?
     So here's the new specification for check-keyword-arguments:
     check-keyword-arguments keywords-or-keyword-plistp
     		        &optional errorp-or-function
     I don't think we need to restrict this function to a plist of keywords and
     values, as in an initarg list. A list of keywords is a useful argument
     too.  So the first argument tells which to expect as the second argument.
     (I don't think this wrinkle is necessary, so we could drop it.)
     Either a list of keywords or a plist of keywords and values.

You could consider the the following instead:

     check-keyword-arguments keywords-plist
     		        &optional errorp-or-function

Keyword-plist is passed as a key value sequence,
keywords is a list of keywords. 

This is more powerful since you are not constrained to one keyword format for one