From ... Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!newshunter!cosy.sbg.ac.at!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader3.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: specialize method based on array element type References: <1f8trud.14ns1b1sjj3r2N%jdesoi@planetc.com> Mail-Copies-To: never From: Erik Naggum Message-ID: <3224773769758527@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Mar 2002 18:29:20 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader3.kpnqwest.net 1015784960 193.71.199.50 (Sun, 10 Mar 2002 19:29:20 MET) NNTP-Posting-Date: Sun, 10 Mar 2002 19:29:20 MET Xref: archiver1.google.com comp.lang.lisp:28368 * John DeSoi | Is is possible to specialize a defmethod parameter based on the | array-element-type? That does not appear to be the case, as the specialized arrays are not subclasses of the array class. You can find whether the implemenentation has an extension by comparing the value of class-of of your vectors: (class-of (make-array 4 :element-type '(unsigned-byte 8))) I am not sure whether the return value would have to be vector or could be a subclass of vector. Allegro CL 6.1, Lispworks 4.120, CLISP 2.27 all return vector, while CMUCL 3.0.8/18c+/build 3030/whatever has a specialized class. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.