[Openmcl-devel] CCL <-> C++ interface generator in alpha, reviewers wanted

Kevin Reid kpreid at switchb.org
Tue Apr 12 14:22:33 PDT 2011

On Apr 12, 2011, at 16:45, Jason E. Aten wrote:

> One drawback to this approach is that the person writing to the new  
> Lisp interface now *must* provide keyword arguments. It would be  
> nice to not require this when it is redundant.
> Q: Would it be possible to dispatch from initailize-instance from  
> the *arity* and/or *the types* of the arguments alone?

initialize-instance (usually) gets its arguments from make-instance.  
The interface of make-instance IS keyword arguments, period.

(This reduces the complexity of making subclasses of your class,  
because there is no need to pass up just the right arguments and  
repeat constructors as in,  say, Java.)

If you really want to avoid keyword arguments, use a separate function  
which calls make-instance (or, if it suits, use defstruct instead of  
defclass, which has the infamous “boa constructor” mode).

Kevin Reid                                  <http://switchb.org/kpreid/>

More information about the Openmcl-devel mailing list