Re: Small modification Matthias Felleisen 12 Jul 1999 21:29 UTC

How about the following modification:

 <command or definition>
   -> <record type definition>           ; addition to 8.1.6 in R5RS

 <record type definition>
   -> (define-record-type <type name>
        (<constructor name> <field tag> ...)
        <predicate name>
        (<field spec> ...))
   -> (define-record-type <type name>
        (<constructor name> <field tag> ...)
        <predicate name>
        (<field spec> ...)
	(<optional-field spec> ...))

 <field spec> -> (<field tag> <accessor name>)
              -> (<field tag> <accessor name> <modifier name>)

 <optional field spec>
	      -> (<field tag> <expression> <accessor name>)
              -> (<field tag> <expression> <accessor name> <modifier name>)

 <field tag> -> <identifier>
 <... name>  -> <identifier>

The value of the expression field in <optional field spec> is the initial
value of the optional field.

I understand that this rules out references to other fields but that's fine
by me. Someone can now build a more elaborate initialization syntax on top
of this srfi.

-- Matthias