[CM] A CLOS question

cristopher pierson ewing cewing@u.washington.edu
Thu, 26 Sep 2002 12:46:17 -0700 (PDT)


I am working on a problem in which I would like to create an object,
compare it to several other objects, and if it matches, change it into a
different type of object.

My problem is that in ACL, there is a function change-abject that lets me
perform the change easily and in a defined way, but in CLISP there is no
such thing.

I can write a function in CLISP that will do what I want, but then I have
to build my program to call the correct function name depending on whether
I am using CLISP or ACL.  I would prefer to be able to write an
intelligent function (with only one name) that checks to see what type of
lisp I am in, and then performs the proper operation.  That way, the code
for checking which lisp is being used need only exist in one place, rather
than many.

My question is this, can I create a file to be loaded when I start working
that checks to see what type of lisp is being used, and then either uses
the already-existing change-class or uses the one I write for stupid lisps
which lack such a useful function?

Thanks for any suggestions, and let me know if you need more information
about the particulars of my situation.

Cris

********************************
Cris Ewing
CARTAH Assistant
University of Washington
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************