[R6RS] Records draft

Manuel Serrano Manuel.Serrano
Wed Jun 22 11:53:10 EDT 2005


I'm catching up on the Records draft... Here are some comments on your
early comments:

Marc wrote:

> The syntax is important because it is what the programmers will use all
> the time.  If the syntax is awkward or cumbersome, then they will tend
> to use vectors (see below).
I more than agree on that point. I think that the syntax is *extremely*
important. A bad syntax will act as a repellent. In particular, I think that
we should provide a syntax as compact as possible. For this reason, 
I find the Marc's proposal compelling. 

I must admit that I'm not neutral on this because when designing the
Bigloo classes I have made choices that are very close to the ones
we have to make now for records. BTW, the Bigloo class specification
can be read at:

  http://www-sop.inria.fr/mimosa/fp/Bigloo/doc/bigloo-8.html#Object-System

As Marc, I don't understand why we should provide two syntactic
layers. IMHO, we should provide only one which defaults to something
as simple as:

     (define-<whatever-you-want-here> point x y)

for defining a plain 2 dimensional points! 

The single syntactic layers should be customizable so that it allows
the fine tuning that we want on records.

> But a non extensible default makes the code more secure, in the sense
> that the designer of a module has to explicitly say when it is OK to
> subtype a record type that he defined.  Moreover, for locally used
> records, which I think will be the typical case, there is no need for
> the record type to be extended.  As an added bonus the compiler can
> generate more efficient code.
I have a fun example for "final" records:

  Wide classes
  Serrano, M. 
  European Conference on Object-Oriented Programming (13th ECOOP), 
  Lisbon, Portugal, Jun, 1999, pp. 391--415.

It is available at:

http://www-sop.inria.fr/mimosa/Manuel.Serrano/index-5.html#Publications

I do remember that we discusses a procedural interface for records in
Boston but I don't remember which were the arguments in favor of such an
interface. Could someone remind me this? Thanks.


-- 
Manuel


More information about the R6RS mailing list