Re: Why can't defstructs be redefined?
Ville Voutilainen <[email protected]> Thu, 14 Jul 2022 05:53:32 +0300
| Newsgroups | gmane.editors.j.devel |
|---|---|
| Message-ID | <CAFk2RUY0rKLvqrut41=+zfttPbcxPXJbt6_ObDxnp-UqUxZS-g@mail.gmail.com> |
On Thu, 14 Jul 2022 at 05:33, Alan Ruttenberg <[email protected]> wrote: > > Comments inline > Seems to work, as long as you don't allow the source transform. Currently I'm experimenting with a new option to defstruct. So > > I compile a file with > (defstruct (test2 (:optimize nil)) a b) I'm thinking I'm stupid, since I'm not sure what you mean by "source transform", but I can with fair confidence say that if you can ensure that all defstructs use the option you add as a custom-thingy, then the rest of the concerns I spoke of are moot. :P You're basically saying "this is not a regular defstruct, it's a special one, don't do the usual stuff, and then I can make it mean whatever I want it to mean, side-stepping the problems". If that works for your use cases, sure, seems plausible in general. Or have I misunderstood your approach?