
I have an alternative to coming up with different names for the generic equivalent to Common Lisp functions: Give the generic functions the same name as the equivalent Common Lisp functions and intern them in a new package that doesn't use the CL package. Actually, I'd like to see generic equivalents for many Common Lisp functions beyond equality. Using a different package but the same names for the methods as for the Common Lisp functions would save us from coming up with new names - and from having to remember the new names when coding. Say the new package for generic Common Lisp functions has a nickname GL for short. Then the generic for equality would be GL:EQUALP. A GL package could initially implement the basic equivalent methods for Common Lisp functions simply by calling the Common Lisp function, such as: (defmethod gl:equalp (object1 object2) (cl:equalp object1 object2)) Developers can then specialize these methods for custom classes and datatypes. Not only gl:equalp, but also gl:mapcar, gl:sort, gl:rest, ... -- Terje Norderhaug Marco Antoniotti <marcoxa@cs.nyu.edu>
From: marcoxa@gmail.com Date: February 16, 2011 9:58:50 AM GMT+01:00 To: marcoxa@cs.nyu.edu Subject: Names for the equality generic function
If you have trouble viewing or submitting this form, you can fill it out online: https://spreadsheets.google.com/viewform?formkey=dDFZSTJ4OTlCTlNaQlc3YlhUNjA...
Names for the equality generic function
What name should be used for the generic function "equality"? * □ ( ) EQUALITY □ ( ) EQUIV □ ( ) EQUP □ ( ) EQUALS □ ( ) == □ ( ) EQUIVALENT □ ( ) AEQUALIS □ ( ) SAMEP □ ( ) EQUIVP