[plt-scheme] porting SRFI-69 to PLT

From: Chongkai Zhu (mathematica at citiz.net)
Date: Wed Nov 2 13:08:39 EST 2005

Hi all,

Here are two mails on Schematics-develop-list. Since Noel mentions, I forward it here.

------------------------------------------
From: "David Van Horn" <dvanhorn at cs.uvm.edu>
To: "Chongkai Zhu" <mrmathematica at yahoo.com> 
CC: "schematics development" <schematics-development at lists.sourceforge.net> 
Subject: Re: [Schematics-development] Porting SRFI 69 to PLT 
Date: Mon, 31 Oct 2005 15:20:43 -0500 

    
Chongkai Zhu wrote:
> I'm porting SRFI 69 "Basic hash tables" to PLT. Current idea is:
> 
> 1 Constructing the 'hash function bashed on PLT's 'equal-hash-code;
> 2 Using PLT's struct directly instead of SRFI-9.

I'm not sure what your two points are exactly... PLT's implementation of
SRFI 9 is in terms of its own structure system, so defining a SRFI 9
structure is really the same as defining a PLT structure (I believe).

SRFI 69 is just a subset of the functionality of PLT's hash tables with
a slightly different interface.  Porting it to PLT should just be a
matter of mapping one interface to the other (maybe there are more
subtle issues I'm forgetting about).  You shouldn't need to use the
reference implementation at all, or implement any datastructures.

David
------------------------------------------
From:  "Noel Welsh" <noelwelsh at yahoo.com>
Subject: Re: [Schematics-development] Porting SRFI 69 to PLT 
To: "schematics development" <schematics-development at lists.sourceforge.net> 
Date: Wed, 2 Nov 2005 08:29:04 -0800 (PST) 


--- Chongkai Zhu <mrmathematica at yahoo.com> wrote:


> Yes, PLT's implementation of SRFI 9 is a macro to convert
> record into
> struct. But will converting that manually a bit more
> efficient?

It might be, but it probably won't make much difference. 
However it will be easier for other PLT hackers to work on.

> No. Hash table of SRFI 69 can accept a user defined hash
> function, and
> a user defined equal? function. Hash table of PLT uses
> build in hash
> function, and only support (R5RS's) equal? / eq? . So
> SRFI 69 is not a
> subset, but a superset of the functionality of PLT's hash
> table in this sense.

Might be worth raising this issue on plt-scheme, as Matthew
Flatt may be prepared to change the current interface to
make this easier.

Cheers,
Noel

------------------------------------------

-
Chongkai Zhu



Posted on the users mailing list.