chicken-hackers
[Top][All Lists]
Advanced

[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: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix #1294 by mentioning in the docs that define-record-printer is not a definition
Date: Sat, 14 Sep 2019 15:28:44 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Tue, Aug 13, 2019 at 10:16:01PM +1200, Evan Hanson wrote:
> 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.

I really like that what was a macro before is now a procedure.  There's
no real reason it should be a macro, so I think this is a big
improvement, even though dropping the macro would be a breaking change.

I made a few small tweaks to the patch, see attachment.  The types.db
entry was syntactically invalid so I fixed that, and I've added checks
that the argument to set-record-printer! is a symbol (the original
macro contains that check as well).  I've also added that check to
record-printer, so that both procedures can now be #:enforcing in
types.db.

> > > 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...

hehe, yeah...

Cheers,
Peter

Attachment: 0001-Add-record-printer-and-set-record-printer-procedures.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]