Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!cis.ohio-state.edu!math.ohio-state.edu!uwm.edu!newsfeed.internetmci.com!news.dacom.co.kr!usenet.seri.re.kr!news.imnet.ad.jp!wnoc-tyo-news!wnoc-sfc-news!sfc-keio-news!mad
From: mad@math.keio.ac.jp (MAEDA Atusi)
Subject: SET-CAR vs. RPLACA vs. SETF (only) (was Re: ISO/IEC CD 13816 -- ISLisp)
In-Reply-To: mad@math.keio.ac.jp's message of Thu, 14 Dec 1995 05:35:51 GMT
Message-ID: <MAD.95Dec21180454@tanzanite.math.keio.ac.jp>
Sender: news@sfc.keio.ac.jp
Nntp-Posting-Host: tanzanite.nak.math.keio.ac.jp
Reply-To: mad@math.keio.ac.jp
Organization: Faculty of Sci. and Tech., Keio Univ., Yokohama, Japan.
References: <49u965$948@goanna.cs.rmit.EDU.AU>
	<MAD.95Dec14143551@tanzanite.math.keio.ac.jp>
	<4as2be$ckp@camelot.ccs.neu.edu>
	<19951215T014159Z@arcana.naggum.no>
	<4b35de$ilh@goanna.cs.rmit.EDU.AU>
Date: Thu, 21 Dec 1995 09:04:54 GMT
Lines: 36

Ok, I withdraw my "new users" silliness.  Erik Naggum is right.  If
ISLisp retains CAR and CDR tradition, and *if* it provides functions
that are equivalent to (SETF (CAR ...) ...) and (SETF (CDR ...) ...) 
forms, then SET-CAR and SET-CDR would be good names.  Should whole
update functions be dropped?  I don't know.  This affects, at least

  + Meaning of :accessor and :writer slot options of DEFCLASS.
  + We can't do something like (APPLY #'SET-AREF V ARRAY INDEX-LIST)
    unless we have (SETF (APPLY ...) ...).
  + Renaming GET to PROPERTY becomes unnecessary.

--------------------------------------------------------
>>>>> "erik" == Erik Naggum <erik@naggum.no> writes:

           (MAEDA Atusi wrote)
    erik> |   (CL's DEFINE-SETF-METHOD is a mess).

    erik> could you elaborate on that?

It is much more complicated than DEFSETF, but for what reason?
DEFSETF is just fine for almost all purposes.  I know that
DEFINE-SETF-METHOD is necessary when we want to define setf method for
some place forms such as (LDB ...) and (MASK-FIELD ...), but they are
all special in that they do not destructively modify specified data
structure.  That is, (SETF (LDB BYTE INT) V) does not update bits in
integer bound to INT, but the variable INT.  I find this confusing.

If such special cases are the only purposes for DEFINE-SETF-METHOD,
then I think it isn't worth having it.  Or is there more obvious
reason to have it?  If so, enlighten me, please.

;;;  Keio University
;;;    Faculty of Science and Technology
;;;      Department of Math
;;;		MAEDA Atusi (MAEDA is my family name)
;;;		mad@math.keio.ac.jp
