[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix #1294 by mentioning in the docs that d
From: |
Evan Hanson |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix #1294 by mentioning in the docs that define-record-printer is not a definition |
Date: |
Tue, 13 Aug 2019 22:16:01 +1200 |
On 2019-07-12 10:45, Peter Bex wrote:
> On Fri, Jul 12, 2019 at 08:29:58PM +1200, Evan Hanson wrote:
> > In any case, I think we should try to address the issue one way or the
> > other rather than keep a potential pitfall around. If we don't make it a
> > "real" (i.e. fake) definition, could we at least introduce a new name
> > and encourage its use? Perhaps `set-record-printer!', maybe even with a
> > SRFI 17 setter on the type descriptor? Unfortunately, we probably can't
> > remove the old name, since it comes from SRFI 99. But again, making it
> > an actual definition seems OK to me.
>
> It's not from SRFI-99 (or SRFI-9) AFAICT. We can rename it, but that's
> a breaking change. Of course we could keep around the old one during a
> deprecation phase.
Sure, here's a patch that adds a procedural interface as proposed above.
This is also the approach Guile uses, although theirs is called
`set-record-type-printer!`. Let me know what you think.
> > As a sidenote, this issue also applies to `define-reader-ctor', and
> > perhaps others; I didn't review the lot.
>
> hm, I didn't think of that one. That's a procedure, which is even
> weirder.
Yeah, I'm just going to pretend we didn't notice that one for now...
Evan
0001-Add-record-printer-and-set-record-printer-procedures.patch
Description: Text document
- Re: [Chicken-hackers] [PATCH] Fix #1294 by mentioning in the docs that define-record-printer is not a definition,
Evan Hanson <=