Xref: utzoo gnu.emacs:1415 comp.emacs:6671 Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!quiroz From: quiroz@cs.rochester.edu (Cesar Quiroz) Newsgroups: gnu.emacs,comp.emacs Subject: Shared accessors for defstructs Summary: Should we remove type checking from accessors? Message-ID: <1989Aug16.003047.14331@cs.rochester.edu> Date: 16 Aug 89 00:30:47 GMT Reply-To: quiroz@cs.rochester.edu (Cesar Quiroz) Organization: U of Rochester, Dept. of Computer Science, Rochester, NY 14627 Lines: 32 James Aspnes noticed the incompatibility introduced by checking the structure tag before doing an access or alteration, and has suggested to remove the tag checking to permit sharing of common slots. This is admittedly the right thing with respect to slots shared via :include. CLtL gives the choice of NOT performing any checking in this case, but then it seems this would go unreported: (defstruct complex real imag) (defstruct date day month year) (complex-imag (make-date)) ... This would also make accesses and mutations (via setf) faster... The alternative to no tag checking is to make sure that every time we define structs someone is keeping track of the inclusions, so that a runtime check can decide if a slot borrowing is valid or not (ug, more checks at runtime). SO, I would like to ask you people if there is a consensus as to what would be more useful. If you use defstructs (or plan to, etc...), please take a moment to consider which behavior is more useful and mail your opinion to me. Same goes in case you figure out a third option that doesn't break anything else and still fixes this. Thanks, -- Cesar Augusto Quiroz Gonzalez Department of Computer Science University of Rochester Rochester, NY 14627