GSOC | Extending Common Lisp support

Charles Turner chturne@gmail.com
Thu Jun 21 17:35:00 GMT 2012


On 21 June 2012 17:35, Jamison Hope <jrh@theptrgroup.com> wrote:
> Maybe instead have CommonLisp override #'eqv? with its own instance of
> IsEqv? That way scheme-case can still call Scheme.isEqv and get #f,
> and lisp-case
>
> (defun lisp-case ()
>  (case 'b ((a) 'yes) (else 'no)))
>
> can call CommonLisp.isEqv and get NIL.

Thanks Jamison! That worked flawlessly. I went ahead and added
override for eq? and equal? in CommonLisp too.

Another thing I just quickly did. I mentioned earlier that APPLY was
broken in CL because Apply#getArguments wanted an Object[] parameter,
but the rest list was a LList, and we couldn't set the type early
enough in the parameter list because :: has another interpretation in
CL. Helmut pointed out that it didn't make sense in CL for this type
to be specified, so what I've got now is:

(defun apply (f &rest args)
  (declare (gnu.lists.LList args))
  ...)

and then I added the following method in Apply:

public static Object[] getArguments (LList args, int skip, Procedure proc)
  {
    return getArguments(args.toArray(), skip, proc);
  }

Hope that's reasonable!

Thanks again,
Charlie.



More information about the Kawa mailing list