Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.lisp > #60804
| Path | csiph.com!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Thu, 04 Jun 2026 21:02:51 +0000 |
| From | steve g <sgonedes1977@gmail.com> |
| Newsgroups | comp.lang.lisp |
| Subject | Re: slot-value-using-class to remap "virtual" slots & closer-mop |
| References | <m3ldebnkqu.fsf@pison.robolove.meer.net> <m37bpg14fm.fsf@pison.robolove.meer.net> <jwvcxz7doj6.fsf-monnier+comp.lang.lisp@gnu.org> <m3wlxezg7l.fsf@pison.robolove.meer.net> <87eciocrz9.fsf@gmail.com> <m3o6hscmdo.fsf@pison.robolove.meer.net> <10vqr13$4jdd$1@dont-email.me> |
| Date | Thu, 04 Jun 2026 17:01:51 -0400 |
| Message-ID | <87se72xbnk.fsf@gmail.com> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) |
| Cancel-Lock | sha1:RHjm31AK/jvB3c96yY3cQAb6CVw= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 45 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-i0uVxxcHWm+4Hr9z4HFWDNCJ7UmihVqtA/+sOOvluXvKvC677v3dYLd7O5sWQIqRhloNWplfPc6HfpF!dJVspwLERi89FTgFsO6To2JEv701EddrsX2DcHKzs5nou+g= |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| Xref | csiph.com comp.lang.lisp:60804 |
Show key headers only | View raw
Lawrence D’Oliveiro <ldo@nz.invalid> writes:
> On Wed, 03 Jun 2026 09:21:15 +0530, Madhu wrote:
>
< > ... because you can use SETQ instead of SETF.
>
> Can’t you use setf for assigning to everything?
yes and no. setf if a fat macro, setq is preferable to set.
check https://www.lispworks.com/documentation/HyperSpec/Body/f_set.htm
setf = set field
setq = set quote
set = set
; SLIME 2.26.1
CL-USER>
; No value
CL-USER>
; No value
CL-USER> (defvar xyz)
XYZ
CL-USER> (set 'xyz 123)
123
CL-USER> xyz
123
CL-USER> (setq xyz (make-array 10 :element-type 'symbol :initial-element nil))
#(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)
CL-USER> xyz
#(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)
CL-USER> (setf (aref 0 xyz 3) 'three)
; Evaluation aborted on #<TYPE-ERROR expected-type: ARRAY datum: 0>.
CL-USER> (setf (aref xyz 3) 'three)
THREE
CL-USER> (loop for i downfrom (1- (length xyz)) to 0
do (setf (aref xyz i) t))
NIL
CL-USER> xyz
#(T T T T T T T T T T)
CL-USER> (setq (aref xyz 2) nil)
; Evaluation aborted on #<TYPE-ERROR expected-type: SYMBOL datum: (AREF XYZ 2)>.
CL-USER>
Back to comp.lang.lisp | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-04-25 20:35 +0530
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-04-25 18:27 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-05-07 05:22 +0530
Re: slot-value-using-class to remap "virtual" slots & closer-mop Stefan Monnier <monnier@iro.umontreal.ca> - 2026-05-07 15:14 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-05-08 09:48 +0530
Re: slot-value-using-class to remap "virtual" slots & closer-mop steve g <sgonedes1977@gmail.com> - 2026-06-02 21:50 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-06-03 09:21 +0530
Re: slot-value-using-class to remap "virtual" slots & closer-mop steve g <sgonedes1977@gmail.com> - 2026-06-03 22:48 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-04 03:22 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop steve g <sgonedes1977@gmail.com> - 2026-06-04 17:01 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-04 22:42 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-06-08 04:13 +0530
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-07 23:22 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-06-08 07:52 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-06-07 16:42 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-07 23:24 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Nuno Silva <nunojsilva@invalid.invalid> - 2026-06-08 00:57 +0100
Re: slot-value-using-class to remap "virtual" slots & closer-mop Stefan Monnier <monnier@iro.umontreal.ca> - 2026-06-08 09:25 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-06-07 16:31 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Paul Rubin <no.email@nospam.invalid> - 2026-06-07 12:31 -0700
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-08 02:27 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-06-08 07:36 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-09 00:30 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop steve g <sgonedes1977@gmail.com> - 2026-06-09 00:25 -0400
Re: slot-value-using-class to remap "virtual" slots & closer-mop tfb <no_email@invalid.invalid> - 2026-06-09 05:49 +0000
Re: slot-value-using-class to remap "virtual" slots & closer-mop Madhu <enometh@meer.net> - 2026-06-08 04:06 +0530
csiph-web