Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.lisp > #60799
| Path | csiph.com!weretis.net!feeder9.news.weretis.net!border-3.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-4.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Wed, 03 Jun 2026 01:49:58 +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> |
| Date | Tue, 02 Jun 2026 21:50:18 -0400 |
| Message-ID | <87eciocrz9.fsf@gmail.com> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) |
| Cancel-Lock | sha1:wWPdsrJB58IvHYpUaxgEDjTPMyg= |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Lines | 39 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-qHQ8aRZ+Mi65fQ0N7g2jqg4n9at+JtvNVT4Y7yrD3XP5avqZGP2t/T85lzxhHjrzHd0/pCQ/kJOw3ZE!a7GuA3x2v5bqusnyH14hoGtct1imilsATH778xR1s7WzGDA= |
| 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:60799 |
Show key headers only | View raw
Madhu <enometh@meer.net> writes: > > Yes, I was able to replace all that slot-value-using-class machinery > with slot-missing. > > (defclass foo () > ((slot-1 :initform 10 :initarg :slot-1))) > > (defmethod slot-missing ((class standard-class) (obj foo) slot operation > &optional new-value) > (let ((slot-name > (etypecase slot > (symbol slot) > (ccl:standard-effective-slot-definition > (ccl:slot-definition-name slot))))) > (case slot-name > (slot-2 > (ecase operation > (setf (setf (slot-value obj 'slot-1) new-value)) > (slot-boundp (slot-boundp obj 'slot-1)) > (slot-makunbound (slot-makunbound obj 'slot-1)) > (slot-value (slot-value obj 'slot-1)))) > (slot-3 > (ecase operation > (setf (setf (slot-value obj 'slot-1) new-value)) > (slot-boundp (slot-boundp obj 'slot-1)) > (slot-makunbound (slot-makunbound obj 'slot-1)) > (slot-value (slot-value obj 'slot-1)))) > (otherwise (call-next-method))))) > > > This redirects or "forwards" slot-value operations on slot-3 and slot-2 > to slot-1. have you tried with-slots macro? https://www.lispworks.com/documentation/HyperSpec/Body/m_w_slts.htm
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