[R6RS] Records draft

Michael Sperber sperber
Wed Jun 22 10:50:50 EDT 2005


Marc Feeley <feeley at iro.umontreal.ca> writes:

> Can you please explain what you dislike about:
>
>     (define-type point x y)

http://mailman.iro.umontreal.ca/mailman/private/r6rs/2005-January/000409.html
http://mailman.iro.umontreal.ca/mailman/private/r6rs/2005-April/000524.html

> and in what way this is better:
>
>     (define-type point (x y) (fields ((mutable x) x) ((mutable y) y)))
>
> ?

As you know, I'm not a fan of either form.  The second form does have
the advantage of being slightly more explicit about the arguments of
the constructor and the mutability of the fields.  But the main points
are:

- Kent and I wanted a smooth transition path between the primitive and
  the convenience layer.

- Several people were adamant about putting in implicit name
  generation (including Kent and yourself), so we put them in.

> Don't you think the first form is much better for teaching purposes

The first form is disastrous for teaching purposes (and the second one
would probably be as well)---I have more experience than I care for to
make that point.  There's also been plenty of discussion on the
plt-edu and plt-design mailing lists to indicate that it's not just
me.

> What I recall is discussion about having a procedural interface and a
> syntactic interface, and one reason for the procedural interface was
> to explain the syntactic interface.  I do not remember discussion about
> two syntactic interfaces.

Well, what can I say---we did discuss it.

> As far as I can tell the simple interface is a strict subset of the
> featureful interface. 

Yes---that was a design requirement Kent and I posed.

> So why even bother with the simple interface?  

I quote from my previous email:

>> The convenience layer or your proposal don't meet that [R5RS]
>> requirement.  However, the simple layer only has one single means
>> of expressing each aspect of a record-type definition and therefore
>> meets it.

The question for me is, why bother with the fat interface?  But that
doesn't really matter, because people want something like it, and it
has library status.

This is the price of compromise on this issue, and I was pretty happy
that Kent and I came to an agreement on that compromise.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla


More information about the R6RS mailing list