[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: importing srfi-101

This page is part of the web mail archives of SRFI 101 from before July 7th, 2015. The new archives for SRFI 101 contain all messages, not just those from before July 7th, 2015.



Aubrey Jaffer wrote:
 | Date: Thu, 17 Sep 2009 13:50:12 -0400
 | From: David Van Horn <dvanhorn@xxxxxxxxxxxxxxx>
| | Aubrey Jaffer wrote:
 | > http://srfi.schemers.org/srfi-101/srfi-101-tests.sls contains an
 | > import statement:
| > | > ... What would be the import statement to have all the standard
 | > identifiers imported, excepting the list-related ones, which
 | > would come from srfi-101 (with their standard names)?
| | It would be: | | (import (except (rnrs base) cons car cdr ...etc...)
 |          (prefix (only (rnrs base) null?) r6:)
 |          (rnrs exceptions)
 |          (srfi :101))

I think having SRFI-101 shadow R6RS identifiers is the most common way
that SRFI-101 would be used.  As it stands now, every prospective user
must pour through the SRFI-101 specification to create the list of all
the identifiers it binds.  This duplication of effort serves no
purpose.  Please add a complete import statement (replacing ...etc...)
to the text of SRFI-101 as an example of use.

Thanks for the suggestion. I'll incorporate this into the next revision. As a convenience, I can just provide a library that is (rnrs base), except for the list stuff, which will come from (srfi :101), plus all the added bindings, like list-set, etc.

That brings up another issue. Should this SRFI provide a `quote' form that produces random-access pairs? Should this SRFI provide `vector->list', `list->vector', and so on, for all the things in the R6RS base library that consume or construct lists? Should a definition of `equal?' be given that works as you would expect for random-access pairs?

David