[plt-scheme] Mutable and immutable pairs in PLT Scheme
On Wed, Nov 26, 2008 at 07:49:04AM -0700, Matthew Flatt wrote:
> At Wed, 26 Nov 2008 08:35:57 -0600, "Grant Rettke" wrote:
> > On Wed, Nov 26, 2008 at 7:57 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > > At Tue, 25 Nov 2008 23:28:16 -0500, Abdulaziz Ghuloum wrote:
> > >> This is what I'd thought would happen; ditch the (rnrs mutable-pairs)
> > >> library for the sake of (1) more interoperability with the PLT modules,
> > >> (2) more encouragement for people, even outside of PLT, to get rid of
> > >> set-car! and set-cdr! in their code (which should be easy according to
> > >> Matthews's blog), and (3) going through less hassle implementing what
> > >> is effectively a parallel universe just for mutable pairs.
> > >>
> > >> So, I was surprised when I saw that Matthew picked interoperability
> > >> with code that uses set-car!/set-cdr! (very little importance IMHO)
> > >> over interoperability with the rest of the PLT code base.
> > >
> > > I imagined that users would be too unhappy with that level of
> > > non-conformance, but it sounds like I may have been wrong.
> > >
> > > Does anyone here want PLT Scheme's R6RS support to include `(rnrs
> > > mutable-pairs)'?
> >
> > Yes.
> >
> > While I can't claim any Scheme implementation (#3) or programming
> > language design experience (#2) when it comes to this topic, it does
> > seem pretty clear to me that taking this step would create a marketing
> > nightmare for PLT.
>
> Well, the Scheme community being what it is, most any significant
> action creates PR and diplomacy problems. We can deal with them,
> though, if the action is otherwise useful enough.
>
> So, to help gauge usefulness for this potential action, I'll revise the
> question:
>
> Does anyone actually use (and expect to continue to use) the `(rnrs
> mutable-pairs)' library in PLT Scheme's R6RS?
If you implement R6RS, you shoule do so, mutable pairs and all.
But I would have no problems with an additional PLT sublanguage
(perhaps called R6RS-- that did immutable pairs by default, and mutable
pairs using the special mcons function.
I suspect the codebases for the two flavours will be nearly identical.
Those requiring clean interoperability with PLT libraries would end up
using R6RS--.
-- hendrik