Re: MAKE-INSTANCE and STRUCTURE-CLASS
"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]> Mon, 6 Jul 2026 16:14:27 +0200
| Newsgroups | gmane.lisp.lispworks.general,gmane.lisp.cl-pro |
|---|---|
| Message-ID | <CAG0Nw2kgJx5powF9pqFA_ZtqEQPkYvtYRA_Jo9Ug24x1GkrhWQ@mail.gmail.com> |
--0000000000006253170655f1e5c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi my question was about "how can you do this in the least gross way?" As per the bureaucracy, I agree that you need to do things to ensure that it handles STRUCTURE-CLASS and STRUCTURE-OBJECTs in a proper manner. The question is "how"? And the sub question is "why the standard writers punted on this?". Because, IMHO, they did. MA On Mon, Jul 6, 2026 at 4:05=E2=80=AFPM Tim Bradshaw <[email protected]> wrote: > On 6 Jul 2026, at 14:31, David McClain (as dbm at refined-audiometrics do= t > com) <[email protected]> wrote: > > > > But now we are getting into the weeds of language lawyering, and I=E2= =80=99m not > even sure how to interpret the last comments about bureaucracy. Either yo= u > want to accomplish a goal or you don=E2=80=99t. Not sure how arguing abou= t arcane > corners of language design, =E2=80=9Cas the founding fahers envifrsioned = it=E2=80=9D, helps > out? > > I had interpreted Marco's question to be 'can you use make-instance with > structures in portable CL?', to which the answer I gave was no. It turns > out that the eql-method trick maybe means you sort-of can, but it makes m= e > itch (and will certainly break existing code). > > I wasn't answering the question about what you can do in some specific > implementation. > > The comment about bureaucracy is aimed at CLOS, not you (and also a play > on a famous quote about racing cars). CLOS provides this giant bureaucra= cy > around creating instances, and I'm suggesting that just passing an argume= nt > which you call to create whatever it is may often be a radically simpler > approach than trying to persuade make-instance to deal with structures, o= r > providing some one-true-object-allocator. In other words I'm suggesting > that may be code shouldn't wire in make-instance at all but accept a > parameter. > > --tim > > --=20 Marco Antoniotti, Professor, Director tel. +39 - 02 64 48 79 01 DISCo, University of Milan-Bicocca U14 2043 http://dcb.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY REGAINS: https://regains.disco.unimib.it/ --0000000000006253170655f1e5c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div>Hi<br><br></div>my question was about = "how can you do this in the least gross way?"<br><br></div>As per= the bureaucracy, I agree that you need to do things to ensure that it hand= les=C2=A0STRUCTURE-CLASS and STRUCTURE-OBJECTs in a proper manner.<br><br><= /div>The question is "how"?=C2=A0 And the sub question is "w= hy the standard writers punted on this?".=C2=A0 Because, IMHO, they di= d.<br><br></div><div>MA</div><div><br></div></div><br><div class=3D"gmail_q= uote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, J= ul 6, 2026 at 4:05=E2=80=AFPM Tim Bradshaw <<a href=3D"mailto:[email protected]= om">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" = style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa= dding-left:1ex">On 6 Jul 2026, at 14:31, David McClain (as dbm at refined-a= udiometrics dot com) <<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>> wrote:<br> > <br> > But now we are getting into the weeds of language lawyering, and I=E2= =80=99m not even sure how to interpret the last comments about bureaucracy.= Either you want to accomplish a goal or you don=E2=80=99t. Not sure how ar= guing about arcane corners of language design, =E2=80=9Cas the founding fah= ers envifrsioned it=E2=80=9D, helps out?<br> <br> I had interpreted Marco's question to be 'can you use make-instance= with structures in portable CL?', to which the answer I gave was no.= =C2=A0 It turns out that the eql-method trick maybe means you sort-of can, = but it makes me itch (and will certainly break existing code).<br> <br> I wasn't answering the question about what you can do in some specific = implementation.<br> <br> The comment about bureaucracy is aimed at CLOS, not you (and also a play on= a famous quote about racing cars).=C2=A0 CLOS provides this giant bureaucr= acy around creating instances, and I'm suggesting that just passing an = argument which you call to create whatever it is may often be a radically s= impler approach than trying to persuade make-instance to deal with structur= es, or providing some one-true-object-allocator.=C2=A0 In other words I'= ;m suggesting that may be code shouldn't wire in make-instance at all b= ut accept a parameter.<br> <br> --tim<br> <br> </blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si= gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d= iv dir=3D"ltr"><div><span style=3D"font-family:monospace">Marco Antoniotti,= Professor, Director =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tel. +39 - = 02 64 48 79 01<br>DISCo, University of Milan-Bicocca U14 2043=C2=A0=C2=A0 <= a href=3D"http://dcb.disco.unimib.it" target=3D"_blank">http://dcb.disco.un= imib.it</a><br>Viale Sarca 336<br>I-20126 Milan (MI) ITALY<br><br></span></= div><span style=3D"font-family:monospace">REGAINS: <a href=3D"https://regai= ns.disco.unimib.it/" target=3D"_blank">https://regains.disco.unimib.it/</a>= <br></span></div></div> --0000000000006253170655f1e5c9-- _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html