Re: WITH-SLOTS behavior
"Paul Werkowski" <[email protected]> Wed, 7 Nov 2001 17:56:53 -0500
| Newsgroups | gmane.lisp.matlisp.devel |
|---|---|
| Message-ID | <000901c167df$7f0f1f70$0100a8c0@MOBY> |
| | 1. I have noticed that WITH-SLOTS used in conjunction with Matlisp and | an object defined by DEFSTRUCT doesn't always find the requested | slots. For example...if I start in package :USER all is well. | | (IN-PACKAGE :USER) | | ;;; a bunch of code to DEFSTRUCT etc | | (DEFUN DO-SOMETHING (PD) | (WITH-SLOTS (HEADING PITCH GPS-LATITUDE GPS-LONGITUDE) PD | ...)) | WITH-SLOTS on defstruct instances works best inside of DEFMETHOD forms, and accesses to the slots are well optimized by the compiler. I looked at why there were the problems you see in DEFUN forms but did not discover anything useful in the time I had available. Paul